Skip to content

Instantly share code, notes, and snippets.

View yonixw's full-sized avatar

Yehonatan Water Man yonixw

View GitHub Profile
@yonixw
yonixw / README.md
Last active September 11, 2023 22:45
Backup4All Version 9 SQL

Backup4All Version 9 SQL

Export the following map Zip -> Files. So this will not include rows for deleted files. Only when they were added/changed.

Run on latest SQLite Version

How to Export

  1. Open the .bkc file. It is a SQLite file. Might be password protected with the user-defined backup password.
@yonixw
yonixw / README.md
Created August 25, 2023 00:53 — forked from Saphareas/README.md
Psono to Bitwarden Import Script

Psono to Bitwarden Import Script

Psono to Bitwarden Import Script is a script for importing passwords/logins and secure notes from a Psono.pw export file into your Bitwarden vault.

This script requires Python 3 and the Bitwarden CLI client!

$ psono-importer.py [-p|--psonofile] <exported psono file>
Working set size: 196
Progress:-----------------------------------------------------------------| 0/196
@yonixw
yonixw / MAIN.md
Created July 12, 2023 12:54
RTM RTMP stream self hosted

URLs

IP is the WIFI ip or 127.0.0.1 for localhost

  • OBS on pc or Streamlabs on iOS/Android

    • Account Settings -> Custom RTMP
    • rtmp://<ip>:1935
    • pass: test
  • VLC, open:

@yonixw
yonixw / json2csv.ts
Last active June 8, 2023 08:49
Json2CSV against injections
const csv_safe_quote = '"';
const csv_safe_escapedQuote = '""""';
function safe_csv_item(item:any) : string {
try {
if (item === "") {
return '""'
}
// Force string:
npm install -g underscore-cli
underscore help
underscore --wrapwidth 75 pretty < input.json
@yonixw
yonixw / real diff.sh
Created November 3, 2022 15:05
Git REAL diff
* git branch -a
* git ls-files
* git diff <branchA> <branchB> -- <file>
* git diff CI_CD remote_data --
git ls-files | grep -vE "yarn\.lock|package-lock\.json" | xargs -L1 -d '\n' git --no-pager diff remotes/origin/remote_data remotes/origin/CI_CD -- >> diff.diff
@yonixw
yonixw / split_crop.sh
Created September 18, 2022 18:24
magick png image to pdf
magick convert 2.png -crop 1152x1584 +repage 2.meta-coin.pdf
@yonixw
yonixw / fetchOnefile.js
Last active November 6, 2022 18:41
fetch onefile
const https = require("https");
function getReq(_url, _headers) {
return new Promise((ok, bad) => {
const headers = _headers || {};
let result = { status: -1, headers: {}, body: "" };
if (!_url) return bad("Please provide valid URL");
try {
@yonixw
yonixw / 1export_kubectl.sh
Last active March 2, 2022 18:08
Export kubectl readable yamls
export ns=NAMESPACE # Change this
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
for n in $(kubectl -n $ns get -o=name pvc,configmap,serviceaccount,secret,ingress,service,deployment,statefulset,hpa,job,cronjob)
do
echo "Exporting $n..."
mkdir -p $(dirname $n)
# old # kubectl get -o=yaml --export $n > $n.yaml
kubectl -n $ns get $n -o yaml | kubectl-neat > $n.yaml
@yonixw
yonixw / fgNow.sh
Created February 23, 2022 17:35
nodejs xtrace dtrace trace performance heat map flame graph
if [ -z $1 ] || [ -z $2 ]
then
echo "Usage: [node file] [output svg]"
exit 1
fi
# https://www.brendangregg.com/blog/2014-09-17/node-flame-graphs-on-linux.html
# https://nodejs.org/en/docs/guides/diagnostics-flamegraph/
sudo perf record -e cycles:u -g -- node --interpreted-frames-native-stack --perf-basic-prof-only-functions "$1"