I hereby claim:
- I am gvoysey on github.
- I am gvoysey (https://keybase.io/gvoysey) on keybase.
- I have a public key ASCiKnCcR0KDp_QviGppyRFCap15HpQX1NkYIn1eLiPwbAo
To claim this, I am signing this object:
| #!/bin/bash | |
| myIP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/') | |
| commandString="curl http://textbelt.com/text -d number=1111111111 -d \"message=$myIP\"" | |
| $(eval $commandString) | |
| #call this script from /etc/rc.local with (eval "/path/to/thisscript"); get a text every time your machine reboots with the new IP. |
| public class FakeNameGenerator | |
| { | |
| private static readonly Random Random = new Random(); | |
| private static readonly List<string> _vowels = new List<string> {"a", "e", "i", "o", "u"}; | |
| private static readonly List<string> _consonants = new List<string> | |
| { | |
| "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", | |
| "r", "s", "t", "v", "w", "x", "y", "z" |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Runtime.Serialization; | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| //ref http://alexmg.com/compute-any-hash-for-any-object-in-c/ | |
| namespace Foo | |
| { |
| public class QueuedWriter | |
| { | |
| private byte[] Pw | |
| { | |
| get { return new UnicodeEncoding().GetBytes(UserID.GetSHA1Hash()).Take(16).ToArray(); } | |
| } | |
| public int UserID { get; set; } | |
| private static volatile object _lockObject = new object(); |
| public static class JsonExtensions | |
| { | |
| public static T AsDeserialized<T>(this string instance) | |
| { | |
| T item; | |
| try | |
| { | |
| item = JsonConvert.DeserializeObject<T>(instance, JsonSerializerSettings); | |
| } |
I hereby claim:
To claim this, I am signing this object:
| import re | |
| def known_bad(x): | |
| """provide string substitutions for common invalid tokens, or remove them if not found.""" | |
| return {' ': '_', | |
| '(': '_lp_', | |
| ')': '_rp_', | |
| '-': '_minus_', | |
| '/': '_div_', | |
| ';': '_sc_' |
| #!/usr/bin/python3 | |
| from collections import defaultdict | |
| def words(words_file): | |
| """Return one word at a time from a potentially very large list of words.""" | |
| with open(words_file, 'r') as f: | |
| for line in f: | |
| # give back one word at a time, with no whitespace, and converted to | |
| # lowercase. | |
| yield line.casefold().strip() |
| #!/usr/bin/env python3 | |
| import argparse | |
| import os | |
| import pathlib | |
| import shutil | |
| import subprocess | |
| import sys | |
| import types |
| from collections.abc import Iterable | |
| def should_flatten(x): | |
| return isinstance(x, Iterable) and not isinstance(x, (str, bytes)) | |
| def flatten(x, should_flatten=should_flatten): | |
| for y in x: | |
| if should_flatten(y): | |
| yield from flatten(y, should_flatten=should_flatten) | |
| else: |