Skip to content

Instantly share code, notes, and snippets.

View wikichen's full-sized avatar

Jonathan E. Chen wikichen

  • @edmodo
  • Salt Lake City, UT
View GitHub Profile
@wikichen
wikichen / SketchSystems.spec
Last active July 12, 2018 19:17
## Direction B Prototoype
## Direction B Prototoype
Share Composer
selected Share on Edmodo -> Feed Composer
selected Share in a Group -> Group Composer
selected Send as Message -> Message Composer
Feed Composer*
F_Recipient Field
F_Active
@wikichen
wikichen / Active.png
Last active July 13, 2018 04:55
## Generic Share Composer State Prototype
Active.png
# One line fix for bloated SVG exports
defaults write com.bohemiancoding.sketch3 exportCompactSVG -bool yes
defaults write com.bohemiancoding.sketch3.beta exportComactSVG -bool yes
@wikichen
wikichen / sketch_shortcuts
Last active August 29, 2015 14:25
Create Sketch keyboard shortcuts from the command line
#####
# Create Sketch keyboard shortcuts from the CLI
#
# Keyboard shortcuts on OS X can be created using `defaults write` command in the terminal.
# Meta-keys in the value string are mapped as follows: @ for Command, $ for Shift, ~ for Alt, ^ for Ctrl
#
# You need to restart Sketch for the shortcuts to take effect.
#
# Shortcuts mapped in this demo:
# - Round to Nearest Pixel Edge -> ALT + CMD + X
@wikichen
wikichen / gist:6381321
Created August 29, 2013 18:00
Replace straight quotes with curly quotes.
Find: "([^"]*)"
Replace: “$1”
@wikichen
wikichen / browser-detection.js
Created April 16, 2013 06:25
One-line JavaScript browser detection.
//Browsers
var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/
var IE7 = (document.all && !window.opera && window.XMLHttpRequest && navigator.userAgent.toString().toLowerCase().indexOf('trident/4.0') == -1) ? true : false;
var IE8 = (navigator.userAgent.toString().toLowerCase().indexOf('trident/4.0') != -1);
var IE9 = navigator.userAgent.toString().toLowerCase().indexOf("trident/5")>-1;
var IE10 = navigator.userAgent.toString().toLowerCase().indexOf("trident/6")>-1;
var SAFARI = (navigator.userAgent.toString().toLowerCase().indexOf("safari") != -1) && (navigator.userAgent.toString().toLowerCase().indexOf("chrome") == -1);
var FIREFOX = (navigator.userAgent.toString().toLowerCase().indexOf("firefox") != -1);
var CHROME = (navigator.userAgent.toString().toLowerCase().indexOf("chrome") != -1);
var MOBILE_SAFARI = ((navigator.userAgent.toString().toLowerCase().indexOf("iphone")!=-1) || (navigator.userAgent.toString().toLowerCase().indexOf("ipod")!=-1) || (navigator.userAgent.toString().toLowerCase().indexOf("
@wikichen
wikichen / isp-unthrottle.md
Last active December 10, 2019 14:11
Stop ISPs from throttling YouTube

Run the following commands in terminal:

sudo ipfw add reject src-ip 173.194.55.0/24 in
sudo ipfw add reject src-ip 206.111.0.0/16 in

Check that rules were added:

sudo ipfw list

To delete rules: