Skip to content

Instantly share code, notes, and snippets.

View avetisk's full-sized avatar
🙏
Freelance Almighty Tech-Wizard

Avétis KAZARIAN avetisk

🙏
Freelance Almighty Tech-Wizard
View GitHub Profile
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@TuxedoCat619
TuxedoCat619 / SONIC PI CODE - LIST OF COMMANDS
Last active June 19, 2022 18:52
SONIC PI CODE - LIST OF COMMANDS
#Sonic Pi Command List
#Copy and Paste from this command list into your sonic pi file
#Use the command play to play a note using the default synth
#play note (symbol_or_number)
#Usage:
play 60 #midinote 60 or middle c
play :c4 #create a symbol by typing colon then the note name and an octave designation
play :e5, release: 2, amp: 0.5 #you can add parameters as well
@prologic
prologic / LearnGoIn5mins.md
Last active April 30, 2024 15:10
Learn Go in ~5mins
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@munificent
munificent / generate.c
Last active May 1, 2024 20:06
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@impaler
impaler / get-available-port.js
Created January 6, 2017 10:18
Get an available port from a promise using the nodejs net module
const net = require('net')
async function getAvailablePort () {
return new Promise((resolve, reject) => {
let server = net.createServer()
server.unref()
server.on('error', reject)
// zero gives it away ;)
server.listen(0, () => {
@geoffreydhuyvetters
geoffreydhuyvetters / react_fiber.md
Last active January 13, 2023 06:49
What is React Fiber? And how can I try it out today?
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active April 19, 2024 12:30
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@alptugan
alptugan / CONDTIONALS
Last active June 4, 2023 12:21
Sonic Pi Cheat Sheet
So, let’s flip a coin: if it’s heads, play a drum, if it’s tails, play a cymbal. Easy. We can emulate a coin flip with our one_in function (introduced in the section on randomness) specifying a probability of 1 in 2: one_in(2). We can then use the result of this to decide between two pieces of code, the code to play the drum and the code to play the cymbal:
loop do
if one_in(2)
sample :drum_heavy_kick
else
sample :drum_cymbal_closed
end
@ygotthilf
ygotthilf / jwtRS256.sh
Last active April 30, 2024 18:17
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub