Skip to content

Instantly share code, notes, and snippets.

View aerosol's full-sized avatar
🌞
Praise the sun

hq1 aerosol

🌞
Praise the sun
View GitHub Profile
@aerosol
aerosol / hibp.sh
Created August 26, 2018 23:36
Have I Been Pwnd shell check
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);
}
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
#!/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"`
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFrCPsQBCADThxPRMyWaiKdk4J2WugpWUNM53BeqtKiXXzs6E6sI/CFGfJpa
ckWAq3mAhn8hjpmVlgk7w+5ctMzYhtneQ4rNr4VnqAiRtJNLH1PRW1IbOSLrzChU
Aq8L+c6Edu4lCNdAYu53vggGQG9o6U9jgQhQ+AAInjC1TVAXL4TYf1T7Vojft9ZJ
QTr5PKd9RealK3eYk2xDpL3hF19UU5Jocgrh0XER8qq54vdVSw+C29LQU4OXHX1L
/xjeUTvWGIJmf6qmDEHKz5SpApxerHKhOeDeHzH5RPCSFSt+otMnECrUIYipfU3u
CIKhMrG0rloI1x/Zev5TGIcOD9Sb8j5rpPOjABEBAAG0HEFkYW0gUnV0a293c2tp
IDxocUBtdG9kLm9yZz6JAVQEEwEIAD4WIQRgtCu2oyCy0rifFLwa6VXb1I4IoAUC
WsI+xAIbAwUJAeEzgAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRAa6VXb1I4I
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
@aerosol
aerosol / notes.md
Last active March 17, 2018 20:14
The Year Of Linux Desktop

PC

  • LG 27UD69P-4k
    • expecting 2.0 1080p worst case
  • Crystal Series case 570X RGB
  • Silent Loop 360 water cooler
  • 750W Straight Power 11
  • Ryzen Threadripper 1920X
  • X399 Aorus Gaming 7 mobo
  • 16GB 3000MHz XPG Dazzle CL16
gsettings set org.gnome.mutter overlay-key ''
#!/bin/bash
W=`xdotool getactivewindow`
S1=`xprop -id ${W} |awk -F '"' '/WM_CLASS/{print $4}'`
echo "$S1" >> /tmp/log.txt
if [ "$S1" = "Firefox" ]; then
xdotool keydown --window ${W} Ctrl+t
fi
Part PLN Link
AMD Ryzen 1800X 1 649 https://www.x-kom.pl/p/352316-procesor-amd-ryzen-amd-ryzen-7-1800x-36ghz.html
Corsair H100i v2 459 https://www.x-kom.pl/p/294372-chlodzenie-wodne-corsair-hydro-series-h100i-v2.html
Gigabyte - GA-AB350 Gaming 3 363 https://www.x-kom.pl/p/355888-plyta-glowna-socket-am4-gigabyte-ga-ab350-gaming-2xpci-e-ddr4-usb31-m2.html
Corsair - Vengeance LPX 16GB 799 https://www.x-kom.pl/p/394111-pamiec-ram-ddr4-corsair-16gb-3000mhz-vengeance-lpx-black-cl15-2x8192.html
Samsung 512GB 1,8 Seria 960 Pro M.2 2280 NVMe 1399 https://www.x-kom.pl/p/345076-dysk-ssd-samsung-512gb-18-seria-960-pro-m2-2280-nvme.html
ASUS Radeon RX 550 4G 469 https://www.komputronik.pl/product/386572/asus-radeon-rx-550-4g.html
Fractal define R5 549 https://www.komputronik.pl/product/252671/fractal-design-define-r5-black-window.html
EVGA - SuperNOVA G3 650W 80+ Gold 499 https://proline.pl/zasilacz-evga-supernova-g3-80plus-gold-modular-650w-p949434
LG - 27UD68 1 937 https://vobis.pl/komputery/monitory/lg-monitor-led-ip
@aerosol
aerosol / otp.md
Last active November 14, 2017 07:39

Source: andOTP/andOTP#66

Hello, congratulations on such a nice OTP app. It has everything I want in an app, so I migrated my codes from FreeOTP to andOTP. I wrote a short script to do this.

To run the script, get the tokens.xml file from the FreeOTP directory on the phone, run the script with the filename as a parameter (./freeotp_migrate.py tokens.xml), and the script will output an andOTP-compatible plaintext JSON file. Just restore that and you're done.

Here's the script, released under the MIT license: