Skip to content

Instantly share code, notes, and snippets.

View gist:9549d19efa2704e9359e8bff38662c5b
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDI59XZEW0EMbCrzf8d6iaIth6C5lgPWAY4LJTOcXxedw09kDhgISfeiEVXtkxx4UJbrS/5WGTsqH/SGabi8RmXlUQBhgmEyNnQGAqwrRd+P5OW8xI0T8lWdyFM1qc80MIKX4TYCJ5AUMbLr/Bh2eKbxFbwyf3RGWEJ2F1+SfFGluysyBgcNBt50mPIsvhfsgPyzjalFx/JY5JlTy/X2dNzg38pRfDJmXUdaG87pCLDvxH1ujPto9V3HKjN7PoYrCJ6aWwOfHnxtN0jOvB2MTY9t789vCcJyjxlwe4fBGOZWKQVooLEmC3TEZIpZySHJ5u2RCbyTpGFcXtvPralqMV5 philip@philip-ThinkPad-T420
View Keybase.md

Keybase proof

I hereby claim:

  • I am kirkins on github.
  • I am kirkins (https://keybase.io/kirkins) on keybase.
  • I have a public key ASAXjgrSOptyNHsgzr5ZNwy67OTcRmYh_U-YnsksWl1p2Qo

To claim this, I am signing this object:

@kirkins
kirkins / download.sh
Created August 5, 2019 20:26
download list of youtube videos
View download.sh
while read v; do
echo "$v"
youtube-dl "$v" || echo "$v" > failed
sleep 200
done <videos.txt
View duplicates.sh
for d in */; do
if [ $d = "unique" ]; then
echo unique
else
cp "$d"/* unique
fi
done
View shrink.cs
void FixedUpdate()
{
//rigidBody.AddForce(Vector3.down * 5);
if (direction)
{
transform.localScale += new Vector3(sizeValue, sizeValue, sizeValue) * Time.deltaTime;
sizeCounter++;
if (sizeCounter > 50)
{
direction = !direction;
@kirkins
kirkins / random_video.sh
Last active July 17, 2019 19:54
Get Random Youtube from Hooktube on bash
View random_video.sh
#!/bin/bash
printf "https://youtube.com/"
URL="https://hooktube.com/random?$((1 + RANDOM % 100000000))"
curl $URL -s -L -I -o /dev/null -w '%{url_effective}' \
| cut -d "/" -f 4
@kirkins
kirkins / e20.js
Last active July 4, 2019 19:32
Euler Problem #20 in JS
View e20.js
// factorial
f = (n) => {
n = BigInt(n);
return (n>1) ? n * f(n-1n) : n;
}
// sum of digits in the number
s = (n) => {
return n.toString().split("")
.map(x => parseInt(x))
@kirkins
kirkins / extract.js
Created May 31, 2019 18:04
Extract telegram chat from export
View extract.js
var cheerio = require('cheerio');
var fs = require('fs');
let messageFolder = './messages/';
fs.readdirSync(messageFolder).forEach(file => {
fs.readFile('./'+messageFolder+file, 'utf8', function(err, data) {
if (err) throw err;
@kirkins
kirkins / process-passwords-bitcoin.sh
Created February 14, 2019 18:25
Check bitcoin wallets from password list
View process-passwords-bitcoin.sh
#!/usr/bin/env bash
# Source script from: https://github.com/grondilu/bitcoin-bash-tools.git
source ./bitcoin.sh
while read p; do
PRIVATE=$(echo $p | sha256sum | cut -f 1 -d " ")
P1=$(newBitcoinKey 0x$PRIVATE \
| grep bitcoin\ address \
| head -1 \
@kirkins
kirkins / phrase-keys.sh
Created February 14, 2019 16:51
Generate private bitcoin keys from 15 word combinations of words, input number of keys to create
View phrase-keys.sh
#!/usr/bin/env bash
# first input should be number of private keys to generate
for ((i=1;i<=$1;i++));
do
WORDS=15; LC_ALL=C grep -x '[a-z]*' /usr/share/dict/words \
| shuf --random-source=/dev/urandom -n ${WORDS} | paste -sd " " \
| sha256sum | cut -f 1 -d " "
done