Skip to content

Instantly share code, notes, and snippets.

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

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 Jul 28, 2016
Init script and defaults file for etcd on Ubuntu
View default
# 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=""
View 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 Jan 3, 2016
Testing `getBytes`
View Foo.java
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 Dec 30, 2015
CSS Animation to make a collection of elements tumble off screen
View fallOut.scss
@-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 Nov 19, 2013
Detecting the iPhone via CSS only
View iphone-5.scss
$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
Sinatra memory usage - part 2 (dup change)
View Sintra log
∴ 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
View Sintra Log (subclass) on 3 curl requests
∴ 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 Sep 29, 2012
Scatter Gather HTTP with EventMachine (from a non-EM Ruby class, like Rails)
View em-http.rb
require 'rubygems'
require 'benchmark'
require 'httparty'
require 'eventmachine'
require 'em-http'
class Interatred
You can’t perform that action at this time.