Skip to content

Instantly share code, notes, and snippets.

@strayge
strayge / ml.ipynb
Created November 13, 2023 14:36
just testing NN stuff
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@strayge
strayge / pybrew.py
Created September 18, 2023 20:12
CLI tool for search Homebrew packages and sort results by downloads
"""
CLI tool for search packages on Homebrew repository by provided keyword.
Results sorted by downloads count (last 90 days).
Requirements:
pip install httpx colorama
"""
import argparse
import json
from pathlib import Path
@strayge
strayge / sqlite.ipynb
Created March 1, 2023 07:54
python sqlite performance test
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@strayge
strayge / puzzle.ipynb
Created January 4, 2023 11:53
advent of code 2022 notes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@strayge
strayge / goad_windows_wsl.sh
Created September 15, 2022 13:02
goad windows wsl
# from windows (example below with zsh syntax)
py -m pip install pywinrm
git clone https://github.com/Orange-Cyberdefense/GOAD.git
cd GOAD
VAGRANT_HOME=.vagrant_home vagrant up
# in case no port access for winrm
# https://stackoverflow.com/questions/54010365/how-to-see-what-is-reserving-ephemeral-port-ranges-on-windows
# from WSL2 (ubuntu)
@strayge
strayge / docker-clean.md
Created April 26, 2022 14:59
Cleanup docker images and containers after failed builds

Cleanup docker images and containers after failed builds

Sometimes, there are some untagged images left behind after failed builds. In order to get rid of those, this script can be used.

#!/bin/bash
docker rm $(docker ps -aq)
docker rmi $(docker images | grep "^<none>" | awk '{print $3}')
@strayge
strayge / get_gists.py
Last active February 28, 2022 12:19
Download public and secret gists (token required)
# based on https://stackoverflow.com/a/16233710
import json
import urllib
from subprocess import call
import requests
import os
import math
import sys
USER = sys.argv[1]
@strayge
strayge / custom.css
Created January 20, 2022 20:54
vivaldi css fixes
/* disable white back glow on active favicons */
.tab-position .tab.active .tab-header .favicon {
filter: none !important;
}
/* hide new/restore buttons on tab list */
div.button-toolbar.toggle-trash,
div.button-toolbar.newtab {
display: none !important;
}
@strayge
strayge / Microsoft.PowerShell_profile.ps1
Last active April 28, 2022 11:08
Save to C:\Users\<user>\Documents\WindowsPowerShell
function prompt {
$p = Split-Path -leaf -path (Get-Location)
"PS $p> "
}
remove-item alias:ls
remove-item alias:curl
New-Alias curl "$env:USERPROFILE\scoop\shims\curl.exe"
@strayge
strayge / frida_multiple_unpinning.js
Last active August 15, 2021 09:54
Android ssl certificate pinning bypass script for various methods
/* Android ssl certificate pinning bypass script for various methods
by Maurizio Siddu
Run with:
frida -U -f [APP_ID] -l frida_multiple_unpinning.js --no-pause
*/
setTimeout(function() {
Java.perform(function () {
console.log('');