Skip to content

Instantly share code, notes, and snippets.

View sleeyax's full-sized avatar

Sleeyax sleeyax

View GitHub Profile
@sleeyax
sleeyax / extracting_WPA_Enterprise_account_credentials.md
Created March 3, 2020 18:21
Extracting stored wifi WPA(2)-Enterprise credentials on Windows 10

Extracting WPA(2)-Enterprise credentials

Step by step guide for n00bs.

Requirements

Make sure you have the following software installed:

Guide

Open cmd as administrator, navigate to the directory where you downloaded the extractor tool and run it for the first time:

@sleeyax
sleeyax / README.md
Created June 8, 2020 13:48 — forked from roachhd/README.md
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

@sleeyax
sleeyax / go2c.md
Last active October 13, 2024 01:39
CGO <-> C conversions list
Type C Call method Go type Bytes (byte) Numerical range
char C.char byte 1 -128~127
signed char C.schar int8 1 -128~127
unsigned char C.uchar uint8 1 0~255
short int C.short int16 2 -32768~32767
short unsigned int C.ushort uint16 2 0~65535
int C.int int 4 -2147483648~2147483647
unsigned int C.uint uint32 4 0~4294967295
long int C.long int32 or int64 4 -2147483648~2147483647
@sleeyax
sleeyax / cgo.md
Created July 6, 2020 14:00 — forked from zchee/cgo.md
cgo convert list

See also, http://libraryofalexandria.io/cgo/

Using Go cgo

cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.

So, Here collect materials.

@sleeyax
sleeyax / eslint-cheatsheet.md
Last active July 14, 2020 21:18
eslint cheatsheet

eslint cheatsheet

Configuring rules

Disable eslint check for the next line:

// eslint-disable-next-line no-use-before-define
var thing = new Thing();

Current line:

@sleeyax
sleeyax / kubernetes-commands.md
Last active May 7, 2022 00:19
Super useful kubernetes commands

Kubernetes commands

Edit an existing secret using an external env file

kubectl create secret generic <secret-name> --from-env-file=.env.prod --dry-run -o yaml | kubectl apply -f -

Copy secret from one namespace to another

kubectl get secret mysecret --namespace=default --export -o yaml | kubectl apply --namespace=dev -f -

Delete all evicted pods

kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod

@sleeyax
sleeyax / latency.txt
Created December 8, 2020 14:27 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@sleeyax
sleeyax / introspection_urlencoded.txt
Created April 7, 2021 19:36 — forked from localh0t/introspection_urlencoded.txt
Introspection query from GraphQL-JS (URL-encoded)
%0A%20%20query%20IntrospectionQuery%20%7B%0A%20%20%20%20__schema%20%7B%0A%20%20%20%20%20%20queryType%20%7B%20name%20%7D%0A%20%20%20%20%20%20mutationType%20%7B%20name%20%7D%0A%20%20%20%20%20%20subscriptionType%20%7B%20name%20%7D%0A%20%20%20%20%20%20types%20%7B%0A%20%20%20%20%20%20%20%20...FullType%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20directives%20%7B%0A%20%20%20%20%20%20%20%20name%0A%20%20%20%20%20%20%20%20description%0A%20%20%20%20%20%20%20%20locations%0A%20%20%20%20%20%20%20%20args%20%7B%0A%20%20%20%20%20%20%20%20%20%20...InputValue%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20fragment%20FullType%20on%20__Type%20%7B%0A%20%20%20%20kind%0A%20%20%20%20name%0A%20%20%20%20description%0A%20%20%20%20fields(includeDeprecated%3A%20true)%20%7B%0A%20%20%20%20%20%20name%0A%20%20%20%20%20%20description%0A%20%20%20%20%20%20args%20%7B%0A%20%20%20%20%20%20%20%20...InputValue%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20type%20%7B%0A%20%20%20%20%20%20%20%20...TypeRef%0A
@sleeyax
sleeyax / extract-android-apk.txt
Created April 7, 2021 22:46
Extract android APK cheatsheet
adb shell pm list packages
adb shell pm path com.example.someapp
adb pull /data/app/com.example.someapp-2.apk path/to/desired/destination
@sleeyax
sleeyax / ubuntu_disable_swap.sh
Last active May 28, 2021 09:17 — forked from davidcorbin/commands.sh
Ubuntu Kubernetes disable swap permanently
sudo vim /etc/fstab
# Comment out lines that have the word swap on them
sudo reboot