Skip to content

Instantly share code, notes, and snippets.

Avatar
💗
wu tang is for the children

Adam Rutkowski aerosol

💗
wu tang is for the children
View GitHub Profile
View bt.txt
PID: 87969 (nvim)
UID: 1000 (hq1)
GID: 1000 (hq1)
Signal: 11 (SEGV)
Timestamp: Sun 2020-07-05 00:26:32 CEST (2min 47s ago)
Command Line: nvim
Executable: /usr/bin/nvim
Control Group: /user.slice/user-1000.slice/session-1.scope
Unit: session-1.scope
Slice: user-1000.slice
View polandball.sh
#!/usr/bin/env bash
url1="https://en.bab.la/dictionary/english-polish/$1"
url2="https://en.bab.la/dictionary/polish-english/$1"
shoot() {
curl -s $1 | pup 'div.content > div > div > div > ul.sense-group-results > li a text{}' 2>&1 |
awk 'NF' | head -n 3 | grep -v EOF
}
@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"`