touch README.md
git init
git add README.md
git commit -m "first commit"
## push to remote
# the remote repository must already exist
git remote add origin https://github.com/brianonn/newrepo.git
git push -u origin master
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
BuildTmpDir="$HOME/tmp" | |
hdiutil info | \ | |
awk target="${BuildTmpDir}/MojaveBase.cdr.dmg" ' | |
/image-path/ { | |
path=$3$4$5$6$7$8$9 | |
start=1 | |
next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
function usage() { | |
print "Usage: ci_detect [ detect | get envvar | dump ]" | |
exit -1 | |
} | |
function dumpargs() { | |
printf "ARGC = %d\n", ARGC | |
for (i = 0; i < ARGC ; ++i) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00_timestables_test | |
This is a test gist to try out times tables in golang and erlang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
def entropy(string): | |
"Calculates the Shannon entropy of a string" | |
# get probability of chars in string | |
prob = [ float(string.count(c)) / len(string) for c in dict.fromkeys(list(string)) ] | |
# calculate the entropy | |
entropy = - sum([ p * math.log(p) / math.log(2.0) for p in prob ]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addEventListener('fetch', event => { | |
event.respondWith(bulkRedirects(event.request)); | |
}); | |
async function bulkRedirects(request) { | |
// this does nothing but return what you asked for | |
return fetch(request); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/xenial64" | |
config.vm.provider "virtualbox" do |vb| | |
vb.customize ["modifyvm", :id, "--cpus", "1"] | |
vb.customize ["modifyvm", :id, "--memory", "768"] | |
vb.name = "novoansible" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import gnupg | |
from pywallet import wallet | |
# OS X hack fixed in a newer release of gnupg | |
gnupg._parsers.Verify.TRUST_LEVELS["ENCRYPTION_COMPLIANCE_MODE"] = 23 | |
seed=wallet.generate_mnemonic() |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
I hereby claim:
- I am brianonn on github.
- I am brianonn (https://keybase.io/brianonn) on keybase.
- I have a public key ASAAUGO9rSvZRo6AoFeFjpB4IOt1FrftRqeEqn42O9b2kAo
To claim this, I am signing this object: