Skip to content

Instantly share code, notes, and snippets.

☮️
BTW I use Arch

Adam Rutkowski aerosol

☮️
BTW I use Arch
Block or report user

Report or block aerosol

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aerosol
aerosol / gist:db32d2bf67f6aec36047eea5070f6b20
Last active Aug 21, 2019
Import andOTP data into iPhone authenticator with jq and imagemagick
View gist:db32d2bf67f6aec36047eea5070f6b20
jq -r '.[] | "qrencode -o- -d 300 -s 10 \"otpauth://totp/" + (.label | gsub("[- ]"; "%20")) + "?secret=" + .secret + "\" | display"' codes.txt | while read line; do
eval ${line}
done
View start.sh
#!/usr/bin/env bash
PROJECT=${1:-newproject}
git clone git@github.com:jgthms/bulma-start.git $PROJECT && cd $PROJECT && npm install
tmux split-window -h 'npx browser-sync start --server --files "*.html" --files "css/*.css"'
tmux split-window -v 'npm start'
nvim .
View gist:12d9fe87e6caee9e4355cdce513060f8
(gdb) thread apply all bt
Thread 36 (Thread 0x7f9473fff700 (LWP 8643)):
#0 0x00007f9526321c21 in poll () at /usr/lib/libc.so.6
#1 0x00007f94b85db673 in () at /usr/lib/libpulse.so.0
#2 0x00007f94b85cc990 in pa_mainloop_poll () at /usr/lib/libpulse.so.0
#3 0x00007f94b85ccfe0 in pa_mainloop_iterate () at /usr/lib/libpulse.so.0
#4 0x00007f94b85cd091 in pa_mainloop_run () at /usr/lib/libpulse.so.0
#5 0x00007f94b85db5ae in () at /usr/lib/libpulse.so.0
#6 0x00007f94b815e9fc in () at /usr/lib/pulseaudio/libpulsecommon-12.2.so
View gist:f5524008eef4606fa0e203c696e7ee6c
#!/usr/bin/bash
notify-send --icon=dialog-positive "$0" "$(timew start $1)" && echo "$1" > /tmp/track-current
#!/usr/bin/bash
notify-send --icon=dialog-error "$0" "$(timew stop $1)" && rm /tmp/track-current
#!/usr/bin/bash
if [ -f /tmp/track-current ]; then
arr[0]="*"
arr[1]="-"
View n.sh
#!/usr/bin/env zsh
function edit() {
mkdir -p "$(dirname "$1")" && $EDITOR "$1"
}
function pick() {
note=$(rg . | fzf --preview "cat \$(echo {} | tr ':' '\n' | head -n1)" | awk -F: '{print $1}')
if [[ -n $note ]]
then
@aerosol
aerosol / hibp.sh
Created Aug 26, 2018
Have I Been Pwnd shell check
View hibp.sh
function hibp() {
sha1=$(echo -n "$1"|sha1sum|awk '{print toupper($0)}'|tr -d '\n');
curl -s -H $'Referer: https://haveibeenpwned.com/' https://api.pwnedpasswords.com/range/$(echo -n $sha1|cut -c1-5) | grep -i $(echo -n $sha1|cut -c6-40);
}
View zoom.vim
function! WinZoomToggle() abort
if !exists('w:WinZoomIsZoomed')
let w:WinZoomIsZoomed = 0
endif
if w:WinZoomIsZoomed == 0
execute "tabedit %"
let w:WinZoomIsZoomed = 1
elseif w:WinZoomIsZoomed == 1
execute "tabclose"
let w:WinZoomIsZoomed = 0
View adviseur
#!/usr/bin/env bash
platform="$(uname -s)"
case "${platform}" in
Linux*) player=mpv;;
Darwin*) player=afplay;;
*) echo "Platform unsupported" && exit 1
esac
rate=`curl -s 'https://kantor.aliorbank.pl/chart/EUR/json' | jq '.actualBuyRate' | sed "s/\"//g"`
View public.key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFrCPsQBCADThxPRMyWaiKdk4J2WugpWUNM53BeqtKiXXzs6E6sI/CFGfJpa
ckWAq3mAhn8hjpmVlgk7w+5ctMzYhtneQ4rNr4VnqAiRtJNLH1PRW1IbOSLrzChU
Aq8L+c6Edu4lCNdAYu53vggGQG9o6U9jgQhQ+AAInjC1TVAXL4TYf1T7Vojft9ZJ
QTr5PKd9RealK3eYk2xDpL3hF19UU5Jocgrh0XER8qq54vdVSw+C29LQU4OXHX1L
/xjeUTvWGIJmf6qmDEHKz5SpApxerHKhOeDeHzH5RPCSFSt+otMnECrUIYipfU3u
CIKhMrG0rloI1x/Zev5TGIcOD9Sb8j5rpPOjABEBAAG0HEFkYW0gUnV0a293c2tp
IDxocUBtdG9kLm9yZz6JAVQEEwEIAD4WIQRgtCu2oyCy0rifFLwa6VXb1I4IoAUC
WsI+xAIbAwUJAeEzgAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRAa6VXb1I4I
View lshw.txt
yharnam
description: Desktop Computer
product: X399 AORUS Gaming 7 (Default string)
vendor: Gigabyte Technology Co., Ltd.
version: Default string
serial: Default string
width: 4294967295 bits
capabilities: smbios-3.0 dmi-3.0 smp vsyscall32
configuration: boot=normal chassis=desktop family=Default string sku=Default string uuid=00020003-0004-0005-0006-000700080009
*-core
You can’t perform that action at this time.