Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # OSX for Hackers (Mavericks/Yosemite) | |
| # | |
| # Source: https://gist.github.com/brandonb927/3195465 | |
| #!/bin/sh | |
| # Some things taken from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Ask for the administrator password upfront |
| "css": { | |
| "abbreviations": { | |
| "mqm": "@media screen and (min-width:${1}) {\n\t|\n}", | |
| "mqx": "@media screen and (max-width:${1}) {\n\t|\n}" | |
| } | |
| } |
| # Put this method in your helper file to render inline SVG | |
| def inline_svg(path) | |
| file = File.open("app/assets/images/#{path}", "rb") | |
| raw file.read | |
| end |
| .box { | |
| display: block; | |
| background: red; | |
| width: 200px; | |
| height: 200px; | |
| opacity: 1; | |
| } | |
| .box-hidden { | |
| display: none; |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #!/bin/bash | |
| # use imagemagick to merge all images in a folder to produce a spritesheet | |
| # use conver -append for vertical stacking and | |
| # convert +append for horizontal | |
| if [ $# -gt 0 ] | |
| then | |
| if [ $2 ] |
| /* sample cubic beziers */ | |
| linear = [0.250, 0.250, 0.750, 0.750]; | |
| ease = [0.250, 0.100, 0.250, 1.000]; | |
| easeIn = [0.420, 0.000, 1.000, 1.000]; | |
| easeOut = [0.000, 0.000, 0.580, 1.000]; | |
| easeInOut = [0.420, 0.000, 0.580, 1.000]; | |
| function reverseCubicBezier(cubicBezier) { | |
| return [ | |
| 1 - cubicBezier[2], |
The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.
You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |