Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

kjunggithub / gist:62d384641b1fac47ca70
Created April 30, 2015 17:18
Cut video clip by time without encoding
ffmpeg -y -i input.mkv -vcodec copy -acodec copy -ss 00:10:05 -t 30 output.mkvs
class ApiController extends \BaseController {
// extend apicontroller from homecontroller
// build functions for 400, 403, 500, and other ones that we may use
// return errors with:
// $this->respondNotFound('blah blah cant be found');
// return success with:
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
# vim:set ts=4 sw=4 et ai:
# Retrieve SSH public keys from GitHub and install to authorized_keys.
CURLOPTS="--retry 3 --retry-delay 2 --silent --fail -o $TMP_KEY"
* This file is part of HTMLPurifier Bundle.
* (c) 2012 Maxime Dizerens
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
kjunggithub / gist:dbf31d33aa8fc72c180f
Created May 15, 2014 17:27
start ngrok with subdomain
$ ngrok -subdomain=example 80
error: function(jqXHR, textStatus, errorThrown) {
alert('HTTP Error: '+errorThrown+' | Error Message: '+textStatus);

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\

You can find more (official) details about subl here:


tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name: