Skip to content

Instantly share code, notes, and snippets.

@mzsanford
mzsanford / ssh-config-part
Created March 30, 2016 16:22
Part of my SSH config
# Reno (RNO) wifi hack
#Host github.com
# Hostname ssh.github.com
# Port 443
@mzsanford
mzsanford / More info.md
Last active January 26, 2016 17:57
FB31 HEBREW LETTER BET WITH DAGESH

Root Cause

The NFC used by Twitter goes through Canonical Decomposition followed by Canonical Composition¹. This implys to me that decomposition splits it and then it is inelligible for canonical composition. The best way to track what it does is the Unicode Character Database (UCD). Searching the UCD I can see U+FB31 is in the Composition Exclusions file under the Script Specifics heading. That heading² is described as:

canonically decomposable characters that are generally not the preferred form for particular scripts.

My Summary

@mzsanford
mzsanford / default
Last active July 28, 2016 20:15
Init script and defaults file for etcd on Ubuntu
# Set the pper listening address
# export ETCD_PEER_ADDR=127.0.0.1:7001
# Set other command line options like the name and discovery url
# from https://discovery.etcd.io/new
# export ETCD_OPTS="-name=name_here -discovery=https://discovery.etcd.io/token_here"
export ETCD_OPTS=""
@mzsanford
mzsanford / keybase.md
Created April 10, 2014 03:08
keybase.md

Keybase proof

I hereby claim:

  • I am mzsanford on github.
  • I am mzsanford (https://keybase.io/mzsanford) on keybase.
  • I have a public key whose fingerprint is 3B22 CD6F 7871 FD73 7ED2 5307 1051 10ED C04C BEF1

To claim this, I am signing this object:

@mzsanford
mzsanford / Foo.java
Last active January 3, 2016 12:29
Testing `getBytes`
package com.mzsanford;
import java.util.*;
public class Foo {
public static void main(String [] args) throws Exception {
String str = null;
Scanner sc = new Scanner(System.in);
System.out.println("Starting scanner ...");
while (str != null) {
@mzsanford
mzsanford / fallOut.scss
Last active December 30, 2015 12:59
CSS Animation to make a collection of elements tumble off screen
@-webkit-keyframes fallOutCW {
0% {
-webkit-transform: translateY(0);
}
50% {
-webkit-transform: translateY(1000px) rotate(90deg);
}
100% {
-webkit-transform: translateY(2000px);
}
@mzsanford
mzsanford / iphone-5.scss
Created November 19, 2013 21:08
Detecting the iPhone via CSS only
$iphone_5_aspect_ratio: 40/71;
$retina_resolution: 326dpi;
@media screen and (device-aspect-ratio: $iphone_5_aspect_ratio) and (-webkit-min-device-pixel-ratio: 2) {
/* iPhone 5, 5c or 5s with retina display */
}
@mzsanford
mzsanford / Sintra log
Created May 21, 2013 19:33
Sinatra memory usage - part 2 (dup change)
∴ ruby subclass.rb
== Sinatra/1.4.2 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on localhost:4567, CTRL+C to stop
---- Init myApp
-- Setting up @array id 70222006630940
-- Starting GC
---- Waiting in memory (93296): #<MyApp:0x007fbbab031538 @default_layout=:layout, @app=nil, @template_cache=#<Tilt::Cache:0x007fbbab031308 @cache={}>, @env={"SERVER_SOFTWARE"=>"thin
-- Setting up @array id 70222007258980
@mzsanford
mzsanford / Sintra Log (subclass) on 3 curl requests
Last active December 17, 2015 14:09
Sintra memory usage - Part 1
∴ ruby subclass.rb
== Sinatra/1.4.2 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on localhost:4567, CTRL+C to stop
---- Init myApp
-- Setting up array id 70252864198560
-- Starting GC
---- Waiting in memory (1848): #<MyApp:0x007fca08831ad8 @default_layout=:layout, @app=nil, @template_cache=#<Tilt::Cache:0x007fca08830f20 @cache={}>>
---- Waiting in memory (3576): #<MyApp:0x007fca0a0710a8 @default_layout=:layout, @app=nil, @template_cache=#<Tilt::Cache:0x007fca08830f20 @cache={}>, @env={"SERVER_SOFTWARE"=>"thin
@mzsanford
mzsanford / em-http.rb
Created September 29, 2012 04:23
Scatter Gather HTTP with EventMachine (from a non-EM Ruby class, like Rails)
require 'rubygems'
require 'benchmark'
require 'httparty'
require 'eventmachine'
require 'em-http'
class Interatred