Skip to content

Instantly share code, notes, and snippets.

@partkyle
partkyle / about.md
Created August 11, 2011 18:46 — forked from catwell/about.md
Programming Achievements: How to Level Up as a Developer
@partkyle
partkyle / gist:2224038
Created March 28, 2012 05:50 — forked from robashton/gist:874187
Another naive game loop
function runApplication(){
setInterval(doGameLoop, 1000 / 30);
}
function doGameLoop(){
doLogic();
renderScene();
}
@partkyle
partkyle / build-zsh.sh
Last active December 18, 2015 18:19 — forked from nicoulaj/build-zsh.sh
update git url
#!/bin/sh​
# Build Zsh from sources on Ubuntu.
# From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file.
# Some packages may be missing
sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo
git clone git://git.code.sf.net/p/zsh/code
cd zsh
@partkyle
partkyle / install-git
Last active December 19, 2015 00:39 — forked from jcf/Download and install git from source
install git from source into $HOME
set -e
LOCAL=$HOME/local
mkdir -p $HOME/build
cd $HOME/build
VERSION='1.8.3.1'
wget http://www.kernel.org/pub/software/scm/git/git-$VERSION.tar.gz
tar xzvf git-$VERSION.tar.gz

Local (OS X) Side

~/Library/LaunchAgents/pbcopy.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
     <key>Label</key>
     <string>localhost.pbcopy</string>

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
var margin = 15;
S.cfga({
"defaultToCurrentScreen" : true,
"secondsBetweenRepeat" : 0.1,
"checkDefaultsOnLoad" : true,
"focusCheckWidthMax" : 3000
});
// Create Operations