Skip to content

Instantly share code, notes, and snippets.

View jjt's full-sized avatar
⚔️
J̷̷͓̱͙͕̗A̖̟̰̭͎̹̱̮ͅV̷͔̩̜̭̝̫̯͝ͅA̛̘͟S̯̭̱̹͎̩̭̯C̮̪͙͈͘R̴̯̬̣̟̯̻͞I̡̖̣̬̤̰̬̦͟Ṕ̨̹̫̩̞͍Ţ̝̦

Jason Trill jjt

⚔️
J̷̷͓̱͙͕̗A̖̟̰̭͎̹̱̮ͅV̷͔̩̜̭̝̫̯͝ͅA̛̘͟S̯̭̱̹͎̩̭̯C̮̪͙͈͘R̴̯̬̣̟̯̻͞I̡̖̣̬̤̰̬̦͟Ṕ̨̹̫̩̞͍Ţ̝̦
View GitHub Profile
@jjt
jjt / spectacle-feedback.md
Created October 4, 2015 18:06
Spectacle feedback

The good feels

I enjoyed using Spectacle, and it'll be my go-to for building a deck.

Love the ability to drop in interactive React components. We didn't end up doing that for this deck, but I can see myself using that in the future.

Having everything Just Work™ is fantastic. The Surge CLI is easy to use, but I appreciate having npm run deploy. Maximizes my laziness efficiency.

@jjt
jjt / ahk-caps-toggle.ahk
Created March 27, 2012 18:24
AutoHotKey Caps Toggle
SetStoreCapslockMode Off
^+!C:: Send {CapsLock}
@jjt
jjt / redis.php
Created November 25, 2011 21:45
Arbitrary redis caching of output and serializable objects
<?php
// Needs a global $redis_config
function get_redis($force=false) {
global $redis_config,$redis_instance;
if(!is_object($redis_config))
die("Couldn't find \$redis_config or it's not an object!");
// No redis? No problem!
@jjt
jjt / redis-example.php
Created October 26, 2011 02:12
Redis example in php, with redisphp
<?php
// --------------------------------
// Plain Redis + phpredis
// --------------------------------
$redis = new Redis();
$redis->connect('127.0.0.1');
$cache = $redis->get('key');
//gets the first matching ancestor up the tree, or returns false
//cond can be 'tag', '.classname', '#id-name', Element
Element.implement({
grabParent: function(cond,include_self) {
var parents = this.getParents(),
true_cond = '',
ret = false,
el,
i;
// "%s is great".printf('This')
// -> This is great
//
// "{bar} or {foo}".printf({foo:'A',bar,'B'})
// -> B or A
//
// "{}, {}, {}!".printf([1,2,3])
// -> 1, 2, 3!
String.prototype.printf = function (obj) {
get_kiosk_html : function(mode) {
mode = mode || 'side';
var ret_html = '',
icon_status = (this.avail == 1) ? 'on' : 'off',
class_str = this.prov + ' ' + icon_status,
el_id = this.prov + '_' + this.prov_index,
html_vals = {
id: el_id + '__' + mode,
ctrls: this.get_controls(),
cls: class_str,
@jjt
jjt / hypem-controls.ahk
Created February 1, 2011 04:39
Lets you control the hype machine from other windows
#SingleInstance force
SetTitleMatchMode 2 ; Anywhere in title
SetTitleMatchMode Fast
SendMode Input
#IfWinExist Hype Machine
{
^+d::
WinActivate
return
@jjt
jjt / mytmux.sh
Created January 25, 2011 10:21
My tmux.conf and a sample Django/compass/hamlpy shell script
#!/bin/bash
#
# tmux.sh - example for Django/compass/hamlpy tmux dev setup
#
mydir=/home/dev/movietempest
source $mydir/env-django-1.3.2/bin/activate
py=$mydir/env-django-1.3.2/bin/python
aliaspy=alias py="$py"
ses=mt
let SessionLoad = 1
if &cp | set nocp | endif
let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0
let v:this_session=expand("<sfile>:p")
silent only
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
let s:wipebuf = bufnr('%')
endif
set shortmess=aoO
badd +1 Z:\project\app\views.py