This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
version=$(curl -s https://portswigger.net/burp/releases | grep "Professional / Community" | head -n1 | grep -E "[0-9\.]+" -o) | |
if [[ -d ~/Applications/BurpSuite.app ]]; then | |
local_version=$(cat ~/Applications/BurpSuite.app/Contents/Resources/version.txt) | |
if [[ "$version" == "$local_version" ]]; then | |
echo "Latest version is $version - which is the same as the local" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Go to your Following page. Mine would be https://twitter.com/nytr0gen_/following | |
// 2. Run this script in the Console. Change maxUnfollows to anything you want. | |
// 3. Check in from time to time and run it again if it fails. | |
sendUnfollow = () => document.querySelector('[data-testid=UserCell] [data-testid*=unfollow] span span').click(); | |
confirmUnfollow = () => document.querySelector('[data-testid=confirmationSheetConfirm] span span').click(); | |
sleep = ms => new Promise(r => setTimeout(r, ms)); | |
i = 0; | |
maxUnfollows = 1000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/nytr0gen | |
import requests | |
import PIL | |
import marshal | |
import os | |
import time | |
from PIL import Image | |
from multiprocessing import Pool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.wordWrap": "on", | |
"editor.formatOnPaste": false, | |
"docker.showExplorer": false, | |
// JS specific | |
"eslint.enable": false, | |
// Python specific | |
"python.venvPath": "${workspaceRoot}/.venv", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# facebook has a weird format for naming images you download | |
# it should be timestamp first so you can sort them | |
# but no, they have a weird id first | |
# something like {rnd}_{timestamp}_{rnd}_o.jpg | |
ls *.jpg | awk -F_ '{print $2}' | xargs -I{} bash -c 'mv *{}*.jpg {}.jpg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bin_sqrt(v): | |
lo, hi = 0, v | |
while (hi - lo) > 1: | |
mid = (hi + lo) // 2 | |
sqrmid = mid * mid | |
if sqrmid < v: | |
lo = mid | |
elif sqrmid > v: | |
hi = mid | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id = video_id | |
task_name = "task_" + generateUUID() | |
task_status = { | |
"TaskUUID": task_name, | |
"State": "PENDING", | |
"Result": null, | |
"Error": "" | |
} | |
task = { | |
"UUID": task_name, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i = 0; i < 100; i++) { | |
setTimeout(function(i) { | |
var text = '/remind me invata python boss in ' + (2*i) + ' minutes'; | |
TS.client.ui.onSubmit(text); | |
console.log(text); | |
}.bind(this, i), i * 500); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in `seq 2 30`; do | |
say --progress -r340 -vIoana $i' elefanți se legănau pe o pânză de păianjen, și pentru că, nu se rupea, au mai chemat un elefant'; | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var encodeNP = function(s){ | |
var hex, c; | |
var result = ''; | |
for (var i = 0; i < s.length; i++) { | |
c = s.charCodeAt(i); | |
if (c >= 32 && c <= 126) { | |
result += String.fromCharCode(c); | |
} else { | |
hex = c.toString(16); | |
result += '\\x' + ('000'+hex).slice(-4); |
NewerOlder