Skip to content

Instantly share code, notes, and snippets.

View olalonde's full-sized avatar

Oli olalonde

View GitHub Profile
// First 21-digit prime number found in consecutive digits of e
// answer:
// 957496696762772407663
//
// in hexadecimal:
// 33E7EF9CABBAF6C56F
const bitcore = require("bitcore-lib");
const { PrivateKey, HDPrivateKey } = bitcore;
*
* testing123
*
@olalonde
olalonde / test.js
Last active October 25, 2018 05:21
/*
*
* testing123
*
// test 123
function test() {
console.log('just testing!')
}
/*
*
* testing123
*
*
// test 123
function test() {
console.log('just testing!')
}
/*
*
* testing123
*
*
@olalonde
olalonde / coursera-hsk2-week1.txt
Created April 5, 2018 17:30
Pleco flash cards for Coursera's "Chinese for HSK 2" Week 1 new words
// Coursera HSK 2/Week 1
您[您] nin2 pronoun courteous you 您好! nín hǎo! How are you? or How do you do? 老师, 您早! Lǎoshī, nín zǎo! Good morning, sir (or ma’am)!
对[對] dui4 noun antithetical couplet; couplet 喜对 xǐ duì wedding couplet verb 1 answer; reply 无言以对 wúyányǐduì have nothing to say in reply 2 treat; cope with; counter 刀对刀, 枪对枪 dāo duì dāo, qiāng duì qiāng sword against sword and spear against spear 上海队对北京队 Shànghǎi duì duì Běijīng duì Shanghai versus Beijing 3 train on; direct at 枪口对着某人 qiāngkǒu duì zhe mǒurén train the gun on sb. 她的话不是对着你的。 Tā de huà bù shì duì zhe nǐ de. What she said was not directed at you. 4 bring (two things) into contact; fit together 这个榫头对不上。 Zhège sǔntou duì bù shàng. This tenon does not fit. 5 suit; agree; get along 对心眼儿 duìxīnyǎnr suit one very well; compatible 6 compare; check; identify; verify 对笔迹 duì bǐjì identify the handwriting 对号码 duì hàomǎ verify numbers 7 set; adjust 对好望远镜的距离 duì hǎo wàngyuǎnjìng de jùlí adjust the focus of a telescope 8 mix; add 茶太浓了, 给我对点儿水。 Chá tài nón
<?xml version="1.0" encoding="UTF-8"?><plecoflash formatversion="2" creator="Pleco User -1" generator="Pleco 2.0 Flashcard Exporter" platform="Android" created="1522948311"><cards><card language="chinese"><entry><headword charset="sc">您</headword><headword charset="tc">您</headword><pron type="hypy" tones="numbers">nin2</pron><defn>pronoun courteous you 您好! nín hǎo! How are you? or How do you do? 老师, 您早! Lǎoshī, nín zǎo! Good morning, sir (or ma’am)!</defn></entry><dictref dictid="PACE" entryid="27388672"/><catassign category="HSK 2012-2018/Level 2"/><catassign category="Coursera HSK 2/Week 1"/></card><card language="chinese"><entry><headword charset="sc">对</headword><headword charset="tc">對</headword><pron type="hypy" tones="numbers">dui4</pron><defn>noun antithetical couplet; couplet 喜对 xǐ duì wedding couplet
verb 1 answer; reply 无言以对 wúyányǐduì have nothing to say in reply 2 treat; cope with; counter 刀对刀, 枪对枪 dāo duì dāo, qiāng duì qiāng sword against sword and spear against spear 上海队对北京队 Shànghǎi duì duì
#!/bin/bash
#Background Colors
E=$(tput sgr0); R=$(tput setab 1); G=$(tput setab 2); Y=$(tput setab 3);
B=$(tput setab 4); M=$(tput setab 5); C=$(tput setab 6); W=$(tput setab 7);
function e() { echo -e "$E"; }
function x() { echo -n "$E "; }
function r() { echo -n "$R "; }
function g() { echo -n "$G "; }
function y() { echo -n "$Y "; }
function b() { echo -n "$B "; }
@olalonde
olalonde / apply-registry-secret.sh
Created April 22, 2017 08:56
Create or update AWS registry secret on Kubernetes
#!/bin/bash
update_registry_secret() {
login_cmd=$(aws ecr get-login)
username=$(echo $login_cmd | cut -d " " -f 4)
password=$(echo $login_cmd | cut -d " " -f 6)
endpoint=$(echo $login_cmd | cut -d " " -f 9)
auth=$(echo "$username:$password" | /usr/bin/base64)
configjson="{ \"auths\": { \"${endpoint}\": { \"auth\": \"${auth}\" } } }"
@olalonde
olalonde / create-registry-secret.sh
Created April 20, 2017 04:48
Create a registry secret in Kubernetes
#!/bin/bash
rm /tmp/image-pull-secret.yaml
login_cmd=$(aws ecr get-login)
username=$(echo $login_cmd | cut -d " " -f 4)
password=$(echo $login_cmd | cut -d " " -f 6)
endpoint=$(echo $login_cmd | cut -d " " -f 9)
auth=$(echo "$username:$password" | /usr/bin/base64)
configjson="{ \"auths\": { \"${endpoint}\": { \"auth\": \"${auth}\" } } }"