This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # cd into your Journal/entries/ folder first | |
| # completely untested. Use at your own risk. | |
| for file in $(grep -le "date>2012" *.doentry); do mv $file /backup_folder/; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Title: Responsive Lazy Load YouTube embed tag for Jekyll | |
| # Author: Brett Terpstra <http://brettterpstra.com> | |
| # Description: Output a styled element for onClick replacement with responsive layout | |
| # | |
| # Syntax {% youtube video_id [width height] ["Caption"] %} | |
| # | |
| # Example: | |
| # {% youtube B4g4zTF5lDo 480 360 %} | |
| # {% youtube http://youtu.be/2NI27q3xNyI %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading…</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://gist.github.com/ttscoff/5834741/raw/grablinks.js?x="+(Math.random());})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| require 'net/https' | |
| require 'rubygems' | |
| require 'json' | |
| require 'cgi' | |
| if RUBY_VERSION.to_f > 1.9 | |
| Encoding.default_external = Encoding::UTF_8 | |
| Encoding.default_internal = Encoding::UTF_8 | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| # USAGE: my_bucket_put FILE_1 [FILE_N...] | |
| # Uploads $local_path_for_bucket/FILE_1 to my_bucket/FILE_1 | |
| # This script has very little configuration to keep it simple (and serve my limited needs). | |
| # Create a pre-configured copy of this for all your buckets. Or add command line flags. | |
| # | |
| # Change this to your bucket name | |
| bucketname = "my_bucket" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var embed = [ | |
| 'tag', 'uint32be', | |
| 'code', 'uint32le', | |
| 'greet', 'cstring' | |
| ]; | |
| var def = [ | |
| 'tag', 'cstring:4', | |
| 'code', 'uint32le', | |
| 'embed', embed, | |
| 'length', 'uint16be', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://fhtr.org/structdef.js/shp.html | |
| http://github.com/kig/structdef.js/ | |
| var xyDef = {x: 'float64le', y: 'float64le'}; | |
| var polyDef = { | |
| minX: 'float64le', | |
| minY: 'float64le', | |
| maxX: 'float64le', | |
| maxY: 'float64le', | |
| partCount: 'int32le', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Usage: | |
| // var txt = alignPlane(createText2D('String', 'red', 'Verdana', 64), THREE.RightAlign, THREE.BottomAlign); | |
| // scene.addChild(txt); | |
| function createTextCanvas(text, color, font, size) { | |
| size = size || 24; | |
| var canvas = document.createElement('canvas'); | |
| var ctx = canvas.getContext('2d'); | |
| var fontStr = (font || 'Arial') + ' ' + (size +'px'); | |
| ctx.font = fontStr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 5-year-period histogram of the top 100 sci-fi books | |
| based on http://home.austarnet.com.au/petersykes/topscifi/lists_books_rank1.html | |
| 1800-1804: | |
| 1805-1809: | |
| 1810-1814: | |
| 1815-1819: # | |
| 1820-1824: | |
| 1825-1829: | |
| 1830-1834: |