Skip to content

Instantly share code, notes, and snippets.

@rkumar
rkumar / itunes.sh
Created August 1, 2010 09:23
control iTunes from command line
#!/bin/bash
#
####################################
# iTunes Command Line Control v1.0
# written by David Schlosnagle
# created 2001.11.08
# edit 2010.06.01 rahul kumar
####################################
showHelp () {
@SignpostMarv
SignpostMarv / github-commit-diff-link.user.js
Created March 14, 2011 15:33
github.com raw diff link greasemonkey script
@query
query / rtorrent_xmlrpc.py
Created April 2, 2011 17:25
Python module for interacting with rtorrent's XML-RPC interface directly over SCGI.
#!/usr/bin/python
# rtorrent_xmlrpc
# (c) 2011 Roger Que <alerante@bellsouth.net>
#
# Python module for interacting with rtorrent's XML-RPC interface
# directly over SCGI, instead of through an HTTP server intermediary.
# Inspired by Glenn Washburn's xmlrpc2scgi.py [1], but subclasses the
# built-in xmlrpclib classes so that it is compatible with features
# such as MultiCall objects.
@mmueller
mmueller / bitly.py
Created April 28, 2011 22:52
Command-line bit.ly URL generator (Python)
#!/usr/bin/env python
#
# Copyright 2009 Empeeric LTD. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@razor-x
razor-x / scss.xml
Created May 6, 2011 08:16
SCSS syntax highlighting for Kate. Based on Kate CSS syntax file.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
Kate SCSS syntax highlighting definition
Modified the Kate CSS syntax highlighting definition to support SCSS.
This file should be merged with any updates to the normal Kate CCS definition (see note on version numbering in changelog for 1.2.03.0).
The latest version of this file can be found at https://gist.github.com/958598
@iangreenleaf
iangreenleaf / rvmrc
Created June 21, 2011 06:27
rvm ebuild for Gentoo - not completely kosher
umask g+w
export rvm_path="/usr/local/rvm"
@Raynos
Raynos / critique.md
Created December 1, 2011 14:15
jQuery library critique

jQuery

Related: [Why you don't need jQuery as an abstraction][2]

$ itself is a god object. Everything goes on it. The standard plugin / extension architecture that is recommended is to just bolt more methods on $ itself!

Surely this is bad. An example would be how we have both $.load which is overloaded to do completely different things. If they were on two separate sensibly named objects $Container.load and $EventTarget.load. Personally I would deprecate the latter in favour of .on('load'

The animation should be it's own little modular thing, not bolted onto $. Ajax should be it's own little modular thing, not bolted onto $

@Raynos
Raynos / jQuery.md
Created January 14, 2012 22:44
Why you don't need jQuery

Why the jQuery Abstraction isn't needed.

(One needs some form of browser normalization so that modern features works, no-one is doubting that).

Related: [jQuery library critique][2]

Abstractions that aren't needed

Selectors

server {
listen 443;
server_name git.eatabrick.org;
error_log /var/log/nginx/git.error.log;
access_log /var/log/nginx/git.access.log;
# ssl because cox sucks
ssl on;
ssl_certificate /etc/nginx/ssl/git.eatabrick.org;
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: