I hereby claim:
- I am tothi on github.
- I am tothi (https://keybase.io/tothi) on keybase.
- I have a public key whose fingerprint is 485B 0C27 A19A D1E1 302F A86F F4A7 D558 7B40 6D08
To claim this, I am signing this object:
# git cheatsheet: some basic git instructions (w.i.p.) | |
# create bare repo for an existing source tree | |
git init --bare project.git | |
cd project.git | |
# edit exclude | |
edit info/exclude | |
# add files to bare repo |
# quick note about running GCstar (collection manager) on Win32 (x64) | |
[GCstar homepage](http://www.gcstar.org/index.en.php) | |
[project](https://gna.org/projects/gcstar) is hosted on [Gna!](https://gna.org) | |
current version is 1.7.1 | |
win32 full-featured installer is available up to [1.6.1](http://download.gna.org/gcstar/win32/GCstar_1.6.1_Setup.exe) |
# fix time for Sony camera images | |
exiftool -v0 "-AllDates+=1" -overwrite_original DSC* | |
# exactly (diff is 1 hour -4 min): | |
exiftool -v0 "-AllDates+=0:56" -overwrite_original DSC* | |
# NOTE: cant modify MTS files ;( | |
# batch rename all files (except mp4) in dir based on exif date + model (dry test run) | |
exiftool --ext mp4 -v0 -d %Y%m%d_%H%M%S%%-c '-testname<${DateTimeOriginal}_${Model;s/[ -]//g}.%e' . |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/ruby | |
# | |
# https://github.com/WinRb/WinRM | |
# | |
require 'winrm' | |
opts = { | |
endpoint: 'https://xxx.xxx.xxx.xxx:5986/wsman', | |
transport: :ssl, | |
client_cert: 'certs/MyClient.cer', |
#!/usr/bin/env python3 | |
# | |
# generate reverse powershell cmdline with base64 encoded args | |
# | |
import sys | |
import base64 | |
def help(): | |
print("USAGE: %s IP PORT" % sys.argv[0]) |
#!/bin/bash | |
IFS=$'\n' ; for s in `ls stream_*.asf | head -n -1` ; do | |
ffmpeg -i ${s} -y -c:v copy -an -bsf:v h264_mp4toannexb ${s%.asf}.h264 | |
ffmpeg -r 25 -y -i ${s%.asf}.h264 -c copy ${s%.asf}.mp4 && touch -r ${s} ${s%.asf}.mp4 && rm ${s%.asf}.h264 $s | |
done |
OBSOLETE: moved to Magisk + Magisk Trust User Certs module. | |
Emulator setup with Magisk: https://gist.github.com/tothi/1a206791c8b77d7e42015183c980657e | |
Magisk Trust User Certs module: https://github.com/NVISOsecurity/MagiskTrustUserCerts | |
android emulator clean install + prepare for https proxy analysis | |
================================================================= | |
# clean up old packages |
# ssh socks server on :5000 (tunnels traffic to tunnel-endpoint-server) | |
ssh -D5000 -NT -v user@tunnel-endpoint-server | |
# redsocks: https://github.com/darkk/redsocks | |
# 1.) as a socks client, listen on :4999 and connect to :5000 | |
# 2.) run a dummy udp dns server on :5300 (to force vm to fallback to tcp which is working through ssh socks) | |
cat > redsocks.conf <<EOF | |
base { log_info=on; redirector=iptables; } | |
redsocks { local_ip=127.0.0.1; local_port=4999; ip=127.0.0.1; port=5000; type=socks4; } | |
dnstc { local_ip=127.0.0.1; local_port=5300; } |
# batch convert jpg photos to a4 pdf keeping exif orientation | |
convert *jpg -compress jpeg -auto-orient -quality 75 -resize 1240x1754 -extent 1240x1754 -gravity center -units PixelsPerInch -density 150x150 out.pdf | |
# add auto-rotate to A4 portrait (e.g. for printing): | |
convert *jpg -compress jpeg -rotate "-90>" -quality 75 -resize 1240x1754 -extent 1240x1754 -gravity center -units PixelsPerInch -density 150x150 out.pdf |