Skip to content

Instantly share code, notes, and snippets.

View kemalelmizan's full-sized avatar
🏠
Working from home

Kemal Elmizan kemalelmizan

🏠
Working from home
View GitHub Profile
@kemalelmizan
kemalelmizan / shuffle.js
Created March 28, 2022 06:39
Shuffle string
const shuffle = str => [...str].sort(()=>Math.random()-.5).join('');
@kemalelmizan
kemalelmizan / setup.sh
Last active September 26, 2022 23:55
Setup go in ~
VER="1.16.5"
PREV_VER="1.16.3"
sudo rm /usr/bin/go
curl -O https://dl.google.com/go/go1.16.5.linux-amd64.tar.gz
mkdir -p ~/go1.16.5 && tar -C ~/go1.16.5 -xzf go1.16.5.linux-amd64.tar.gz && rm go1.16.5.linux-amd64.tar.gz
cd ~/go1.16.5 && [ -d ./go ] && mv go/* . && rm -rf go
export PATH=$PATH:`pwd`/bin
cd src
GOROOT_BOOTSTRAP=`$HOME`/go1.16.3 ./all.bash
<?php phpinfo(); ?>
@kemalelmizan
kemalelmizan / extract.js
Last active January 13, 2021 05:59
Extract all URLs
urls = []
$$('*').forEach(e => { urls.push(e?.src, e?.href, e?.url) })
console.log(...new Set(urls))
@kemalelmizan
kemalelmizan / cors.js
Last active January 13, 2021 02:49
CORS Test
x = new XMLHttpRequest()
x.onerror = (e) => console.log(e, x)
x.open('GET', 'https://jsonplaceholder.typicode.com/todos/1')
x.setRequestHeader('Accept', 'application/json')
x.send()