Skip to content

Instantly share code, notes, and snippets.

@alexwidua
alexwidua / ContentView.swift
Created July 4, 2023 17:07
SwiftUI Grid Animation
import SwiftUI
// 1. Use looped H/VStacks to create a grid
// 2. Conditionally increase spacing to grow/shrink the grid
// 3. Calculate the distance of each dot to the center and use the value to stagger the animation
//4. Add random delay on top of the staggered delay value
struct ContentView: View {
// const & state
@melvinsh
melvinsh / mimetypes.txt
Created December 13, 2018 23:01
Mime types for Burp Suite
application/atom+xml
application/json
application/json
application/json
application/ld+json
application/rss+xml
application/vnd.geo+json
application/xml
application/xml
application/javascript
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 3, 2024 07:50
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@chriscandy
chriscandy / install-arch-linux-using-efi-and-grub.md
Last active May 3, 2024 07:50
Install Arch Linux using EFI and GRUB

Installing Arch linux with EFI

  1. Change keyboard layout:

    • loadkeys no
  2. Verify boot mode:

    • ls /sys/firmware/efi/efivars (If the directory exist your computer supports EFI)
  3. Ping some site on the Internet to verify connection:

  • ping archlinux.org

I've recently joined Amazon Dublin from India and got opportunities to interview with Meta London, Zalando Berlin & some other companies. I extensively researched about companies hiring internationally which support visa & relocation for Tech roles. So sharing list of companies:

Do consider to STAR, if it helped you.

London

@p69
p69 / raydium_pool_info.ts
Created February 25, 2024 22:21
Raydium - get all pool info by pool id
async function getPoolInfo(connection: Connection, poolId: PublicKey): Promise<ApiPoolInfoV4> {
const info = await connection.getAccountInfo(poolId);
if (!info) {
throw error('No Pool Info')
}
let amAccountData = { id: poolId, programId: info.owner, ...LIQUIDITY_STATE_LAYOUT_V4.decode(info.data) }
const marketProgramId = amAccountData.marketProgramId
const allMarketInfo = await connection.getAccountInfo(marketProgramId)
if (!allMarketInfo) {
@vasanthk
vasanthk / System Design.md
Last active May 3, 2024 07:46
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@sundowndev
sundowndev / GoogleDorking.md
Last active May 3, 2024 07:46
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@makeittotop
makeittotop / vault_logrotate
Created September 9, 2019 05:16 — forked from soloradish/vault_logrotate
logrotate setting file for HashiCorp's Vault audit file
# Change the path below to your own audit log path.
/var/log/vault/audit.log {
rotate 30
daily
# Do not execute rotate if the log file is empty.
notifempty
missingok
compress
# Set compress on next rotate cycl to prevent entry loss when performing compression.
delaycompress
@jbratu
jbratu / setupiisforsslperfectforwardsecrecy_v17.ps1
Last active May 3, 2024 07:40
Great powershell script for tightening HTTPS security on IIS and disabling insecure protocols and ciphers. Very useful on core installations.
# Copyright 2019, Alexander Hass
# https://www.hass.de/content/setup-microsoft-windows-or-iis-ssl-perfect-forward-secrecy-and-tls-12
#
# After running this script the computer only supports:
# - TLS 1.2
#
# Version 3.0.1, see CHANGELOG.txt for changes.
Write-Host 'Configuring IIS with SSL/TLS Deployment Best Practices...'
Write-Host '--------------------------------------------------------------------------------'