Skip to content

Instantly share code, notes, and snippets.

View eculver's full-sized avatar
🧠
Braining

Evan Culver eculver

🧠
Braining
View GitHub Profile
@eculver
eculver / manr.sh
Created May 14, 2017 03:26
Learn something new!
#!/bin/bash
ls /usr/share/man/man* | cut -d '.' -f1 | sort -u | shuf -n1 | xargs man
@eculver
eculver / protocol-fix.txt
Created March 16, 2015 18:54
How to deal with tmux "protocol version mismatch"
$ tmux attach
protocol version mismatch (client 7, server 6)
$ pgrep tmux
3429
$ /proc/3429/exe attach
@eculver
eculver / custom-naming
Created September 2, 2014 05:34
Sickbeard Custom Naming Pattern
%SN/S%0S/%S.N-S%0SE%0E-%E.N
Sample:
Show Name/S02/Show.Name-S02E03-Ep.Name.ext
@eculver
eculver / keybase.md
Created August 15, 2014 01:57
Keybase proof

Keybase proof

I hereby claim:

  • I am eculver on github.
  • I am eculver (https://keybase.io/eculver) on keybase.
  • I have a public key whose fingerprint is 0A08 44A8 D6ED CCDD 4929 9BCD B530 10D9 1726 B005

To claim this, I am signing this object:

@eculver
eculver / command_t.sh
Last active August 29, 2015 14:00
Shell Notes: Install Command-T
# in .vimrc install w/ Vundle/Pathogen/etc
# Bundle "command-t"
# build the extension
cd ~/.vimrc/bundle/command-t/ruby/command-t
ruby extconf.rb
make
# restart vim
if ($parentId) {
$parentCondition = "node-closure.ancestor = $parentId";
$parentCondition = "node-closure.depth = 1";
} else if ($rootId) {
$parentCondition = "node-closure.ancestor = $rootId";
}
$clientCondition = "node.clientId = $clientId";
$assetCrit->addExpr('where', $parentCondition)
@eculver
eculver / wd-grid-view-overrides.js
Last active August 29, 2015 13:57
Script to override Wiredrive Wordpress plugin's grid-view with larger images.
// create timeout to make sure it runs last
setTimeout(function () {
$(".wd-thumbnail").css('background-image', 'none').css({'width': 238, 'height': 144});
$(".wd-thumbnail img").css({'width': 238, 'height': 144}).show();
}, 200);
@eculver
eculver / randhash
Last active August 29, 2015 13:57
One-liner to get a random character string for use in fixtures or mocking.
alias randhash='python -c "import md5; from datetime import datetime; print md5.new(datetime.now().strftime(\"%s\")).hexdigest()"'
/**
* Example Module in RequireJS
define([
'common/js/models/user',
'common/js/models/event',
'myapp/js/player'
], function () {
Ember.Application.initializer(ret = {
{
"thumb": {
"href": "http://cache.mycdn.com/path/to/asset/a0324d3.jpg",
"width": 80,
"height": 80,
},
"asset": {
"id": 342393,
"title": "Client Commercial",
"filename": "mycommercial.m4v",