Skip to content

Instantly share code, notes, and snippets.

View dimon222's full-sized avatar
💭
Patching code

Dmitry Romanenko dimon222

💭
Patching code
View GitHub Profile
@dimon222
dimon222 / install-k3s.sh
Created August 15, 2020 21:55 — forked from mattkenn4545/install-k3s.sh
K3s/Rancher install script
#!/bin/env bash
set -e
export PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
: <<'README'
# Master node install, note this script /should/ be idempotentish. Rerunning to get worker node command output is fine
sudo -E ./install-k3s.sh
# to skip install of rancher
SKIP_RANCHER_INSTALL=true sudo -E ./install-k3s.sh
@dimon222
dimon222 / clean.sh
Last active December 31, 2020 15:59
Delete bloatware from huawei (Huawei apps only)
adb uninstall -k --user 0 com.baidu.input_huawei
adb uninstall -k --user 0 com.huawei.appmarket
adb uninstall -k --user 0 com.huawei.android.chr
adb uninstall -k --user 0 com.huawei.android.FloatTasks
adb uninstall -k --user 0 com.huawei.android.hsf
adb uninstall -k --user 0 com.huawei.android.hwpay
adb uninstall -k --user 0 com.huawei.android.karaoke
adb uninstall -k --user 0 com.huawei.android.mirrorshare
adb uninstall -k --user 0 com.huawei.android.remotecontroller
adb uninstall -k --user 0 com.huawei.search
@dimon222
dimon222 / index.js
Created April 18, 2018 00:43 — forked from Jimbly/index.js
Steam CD Key Batch query
const assert = require('assert');
const async = require('async');
const fs = require('fs');
let request = require('request');
const FileCookieStore = require('tough-cookie-filestore');
if (!fs.existsSync('cookies.json')) { fs.writeFileSync('cookies.json', '{}');}
let j = request.jar(new FileCookieStore('cookies.json'));
request = request.defaults({ jar : j });

I wanted to extract my OTP secrets from Authy, so that I could install them on my preferred OTP generator. I found this gist by Indrek Ardel, based on another by Brian Hartvigsen, which were very thorough, but had out-of-date console instructions and sent your secret data through a Google QR code image-generator service. Thankfully, the general principle still works, with some simplification. Turn on developer mode for Chrome extensions and open the JS console for the Authy Chrome app's main.html, and enter:

appManager.getDecryptedApps().forEach(a => { console.log(a.name + ': ' + a.secretSeed); });

This will display the hex-encoded seed for each service that you have configured with Authy. Copy the one you want.

To generate a OTP with that seed (in hex! You don't need to convert to Base32 for oathtool, which is available in Homebrew as part of the oath-toolkit fo