Skip to content

Instantly share code, notes, and snippets.

View benchonaut's full-sized avatar
👻

Benjamin Freitag benchonaut

👻
  • ( yes )
  • World
  • 15:01 (UTC +02:00)
View GitHub Profile
@benchonaut
benchonaut / README.md
Last active December 3, 2022 22:43
firefox-restore-jsonlz4-dump

FckUfox ( Firefox ) session jsonlz4 recovery from sessionstore-backup

note: Firefox will be subsequently called FckUfox in this doc

edit 2022: TRY TO AVOID FCKUFOX AS MUCH AS POSSIBLE ; FCKUFOX WILL waste

if any firefox accountable person ever reads this:

@benchonaut
benchonaut / stats-memcached.php
Last active December 5, 2019 02:55
stats-memcached-redis
<?php
error_reporting(E_ALL);
$target='';
if ($argc < 2 )
{
fwrite(STDERR, "noHost=localhost\n" );
$target='localhost';
} else {
$target=$argv[1];
}
@benchonaut
benchonaut / alpine-cpuminer.sh
Last active November 3, 2019 09:40
cpuminer alpine-linux
apk add lm_sensors openssh mtools e2fsprogs-extra xfsprogs bash automake gcc m4 autoconf clang jansson-dev libxml2-dev g++ make curl-dev gmp-dev lm_sensors lm_sensors-detect perl file;
git clone https://github.com/JayDDee/cpuminer-opt.git;
cd cpuminer-opt/ && ./configure --disable-dependency-tracking && make -j4 && make install
@benchonaut
benchonaut / mass-gtalksms.sh
Created October 28, 2019 22:31
gtalk sms group sender
#!/bin/bash
# be ready to confirm on your phone because android will ask if you send many sms
# expect high latency in gtalksms when sending
# be sure to change myphone@xmpp.tld
#
## choose a good server ( e.g not the rate-limiting jabber.ccc.de) and set it in .sendxmpprc
#ATTENTION: ubuntu/mint sometimes uses the "old" sendxmpp which whe didnt get to work
#!/bin/bash
@benchonaut
benchonaut / ssl-cert-info.sh
Created August 31, 2018 01:35
Shell script to check SSL certificate info like expiration date and subject. Taken from http://giantdorks.org/alain/shell-script-to-check-ssl-certificate-info-like-expiration-date-and-subject/
#!/bin/bash
usage()
{
cat <<EOF
Usage: $(basename $0) [options]
This shell script is a simple wrapper around the openssl binary. It uses
s_client to get certificate information from remote hosts, or x509 for local
certificate files. It can parse out some of the openssl output or just dump all
@benchonaut
benchonaut / hits.md
Last active November 20, 2017 00:46
hits

nightcall m83 - midnight city

BØRNS - 10,000 Emerald Pools

chemical brothers - galvanize

college & electric youth - a real hero

sebastian tellier - ritourne

@benchonaut
benchonaut / README.md
Created November 19, 2017 12:38
mindmup → tiddlywiki

Mindmup WAS cool , but they choose do switch to closed source (B1TCHM0VE) , and require a Google/NSA Account as well ( Go4ckUSlts), so even their import / export function in MindSlt2 is nonsense. Luckily .mup files are simple json ,# and tiddywiki with map plugins also export/import to/from .json ... the troubles faced might be resolved...

IMAGES

both have base64 images, but mindmup defines width & height, tiddlymap needs an single image/png tiddler , icons have a size ( which shouldn't be higher than 150), so we choose to take the largest dimension and scale it by factor 0.2 ( if images in your mindmup scale to 1400px in largest dimension, use 0.1)

>

@benchonaut
benchonaut / README.md
Last active February 1, 2021 10:58
LineageOS WIKO Lenny3

Hey, this is just a bunch of hints for enabling lineageOS on WIKO Lenny3

ro.product.brand=WIKO ro.product.name=V3702AN ro.product.device=V3702AN

Factory Mode (PWR+VOLDOWN) dies with TWRP SP-Tool won't work until you enter dev mode and enable "Unlock Bootloader"

>SuperSU taken was UPDATE-SuperSU-v2.76-20160630161323.zip (beta sounded ugly)

@benchonaut
benchonaut / _backupdomains.ver.0000.0810.test.sh
Last active August 3, 2020 16:05
Backup domain folders, their respective mysql db and their mongodb collection
#!/bin/bash
##LOAD .profile in case of cron
. ~/.profile
##INIT BASICS
. ~/.backupdomains.conf ## LOAD CONFIG FROM FILE
#######################################
##~/.backupdomains.conf should contain
#| BACKUP_DEST=~/backup/
#| DOMAINS=/domains
### and if you want do mongodump collections as well
@benchonaut
benchonaut / .y0l0_lib.bash
Last active August 28, 2017 12:45
scripts
#__pictures_by_camera() { mkdir pictures_by_camera/;find -type f|sort|uniq |grep -e jpg$ -e log$ -e LOG$ -e JPG |while read file;do ( file $file|grep EXIF|sed 's/: JPEG.\+//g';while read exiffile;do datebase=$(exiftool -t $exiffile |grep -e Date|base64 -w0 ) ; modelbase=$(exiftool -t $exiffile |grep -e Model|base64 -w0 );echo -ne "\n"$(echo $exiffile|sed 's/.\+\///g')"...d..."$(echo $datebase|md5sum|cut -d" " -f1)"...m..."$(echo $modelbase|md5sum|cut -d" " -f1)"\n$(echo $datebase|base64 -d|while read timestampline;do echo $timestampline|head -c8 ;echo "$timestampline"|cut -f2-;done)" & done ) ; done ; } ;
# y0pid() { $(hostname -a)"::"$(id -u|cut -d" " -f1;)"::==::"$(id -un)::$$ ; } ;
ytdlpts="--all-subs --xattrs --embed-subs --add-metadata --xattrs --prefer-avconv ";ytdlfrstrnpts=" --no-post-overwrites";
n3t_flickrhosts() { curl -k "https://www.flickr.com/help/test"|grep test.png|sed 's/href="/\nhref="/g'|grep ^href|cut -d"/" -f3|sort|uniq ; echo flickr.com;echo www.flickr.com ; } ;