Skip to content

Instantly share code, notes, and snippets.

View JT5D's full-sized avatar
💭
Multiversing...

JT5D JT5D

💭
Multiversing...
View GitHub Profile
# 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
---
layout: nil
---
{
"tags_count": [{% for tag in page.json_tags_count %}
{"name":"{{tag.name}}","count":{{tag.count}}},{% endfor %}
false],
"tags": [{% for tag in page.json_tags %}
"{{tag}}",{% endfor %}
false]
# 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 %}
@JT5D
JT5D / my_bucket_put
Created November 10, 2013 18:01 — forked from kig/my_bucket_put
#!/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"
@JT5D
JT5D / test.js
Created November 10, 2013 18:01 — forked from kig/test.js
var embed = [
'tag', 'uint32be',
'code', 'uint32le',
'greet', 'cstring'
];
var def = [
'tag', 'cstring:4',
'code', 'uint32le',
'embed', embed,
'length', 'uint16be',
@JT5D
JT5D / gist:7401575
Created November 10, 2013 18:01 — forked from kig/gist:2768097
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',
@JT5D
JT5D / gist:7401576
Created November 10, 2013 18:01 — forked from kig/gist:1229476
// 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;
@JT5D
JT5D / gist:7401577
Created November 10, 2013 18:01 — forked from kig/gist:757198
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: