I hereby claim:
- I am elasticdog on github.
- I am elasticdog (https://keybase.io/elasticdog) on keybase.
- I have a public key whose fingerprint is 5FC9 160D A643 E0E9 B83A F4BB 5E34 0427 C31E 7946
To claim this, I am signing this object:
| javascript:(function(){var%20ps=document.getElementsByTagName("pre");for(var%20i=0;i<ps.length;i++){ps[i].style.whiteSpace="pre-wrap";ps[i].style.width="600px";}})(); |
| /// Uses the Bhattacharyya coefficient to determine if text is likely to be English. | |
| /// | |
| /// Higher is better. | |
| pub fn probability_english(text: &str) -> f64 { | |
| // count of the number of times a character occurs in the given text | |
| let mut count: BTreeMap<char, f64> = BTreeMap::new(); | |
| for letter in text.chars() { | |
| match count.entry(char::to_uppercase(letter)) { | |
| Vacant(entry) => { entry.set(1f64); }, | |
| Occupied(mut entry) => *entry.get_mut() += 1f64, |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| # | |
| # delete-ami | |
| # | |
| # A script to deregister an Amazon Machine Image (AMI) and | |
| # delete its corresponding root device snapshot. | |
| # | |
| ##### Functions |
| stderr: E: Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/universe/a/arpack/libarpack2_3.1.5-2_amd64.deb 403 Forbidden |
| #!/bin/bash | |
| readonly FILE='domains.list' | |
| readonly MAX_CHAIN_LENGTH=5 | |
| readonly PORT=443 | |
| while IFS= read -r domain; do | |
| echo -ne "${domain} $(/usr/bin/dig ${domain} +short | tail -n 1)\n" | |
| echo QUIT | /usr/bin/openssl s_client -verify ${MAX_CHAIN_LENGTH} -connect ${domain}:${PORT} 2>1 | grep 'Verify return code' | |
| done < "$FILE" |
| #!/bin/sh | |
| pkg=$1 | |
| if [ "$pkg" = "" -o ! -e "$pkg" ]; then | |
| echo "no package supplied" 1>&2 | |
| exit 1 | |
| fi | |
| leadsize=96 | |
| o=`expr $leadsize + 8` |
| hypepass () { | |
| if [[ -z $1 ]]; then | |
| echo 'Usage: hypepass <USERNAME>' | |
| echo 'Generate a user-specific password for allowing someone to peer with your cjdns host' | |
| else | |
| desired=64 | |
| random=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w $(( ${desired} - ${#1} - 1 )) | head -n 1) | |
| echo "{ \"user\": \"${1}\", \"password\": \"${1}:${random}\" }" | |
| fi | |
| } |
| package main | |
| import ( | |
| "encoding/hex" | |
| "flag" | |
| "io" | |
| "io/ioutil" | |
| "log" | |
| "net" | |
| "os" |