Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jbrooksuk's full-sized avatar
🧑‍🚀

James Brooks jbrooksuk

🧑‍🚀
View GitHub Profile
//Changing Event Handler Context
//You can access the context by using the "this" pseudo parameter. The context of most jQuery Event Handler's
//is the DOM element that caused the event. There may be times when you want to change the context (the value
//of "this") inside of your event handler. In that case, you should use the $.proxy() method. The $.proxy()
//method allows you to manually define what you want the context to be inside your event handler.
//Utilizing the $.proxy() method to change context
var contact = {
name: "jQuery",
/*
---
name: guilloche
script: guilloche.js
description: guilloche
provides: [Guilloche]
...
*/
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@p01
p01 / LICENSE.txt
Last active March 9, 2024 13:40 — forked from 140bytes/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@Thinkscape
Thinkscape / PSR-0-final-proposal.md
Created September 22, 2011 10:30
PSR-0 Final Proposal (PHP Standards Working Group)

PSR-0 Final Proposal (PHP Standards Working Group)

The following describes the mandatory requirements that must be adhered to for autoloader interoperability.

Mandatory:

  • A fully-qualified namespace and class must have the following structure \ <Vendor Name> \ (<Namespace>)* \ <Class Name>
  • Each namespace must have a top-level namespace ("Vendor Name").
  • Each namespace can have as many sub-namespaces as it wishes.
  • Each namespace separator is converted to a DIRECTORY_SEPARATOR when loading from the file system.
  • Each "_" character in the CLASS NAME is converted to a DIRECTORY_SEPARATOR. The "_" character has no special meaning in the namespace.
@kurisuchan
kurisuchan / gist:1262135
Created October 4, 2011 16:43
Moving MySQL databases to ramdisk on Ubuntu
# Tweaked from http://tomislavsantek.iz.hr/2011/03/moving-mysql-databases-to-ramdisk-in-ubuntu-linux
# Log in as root
# Mount ramdisk folder in RAM
mkdir /tmp/ramdisk
mount -t tmpfs -o size=128M tmpfs /tmp/ramdisk/
# Move MySQL data
mv /var/lib/mysql /tmp/ramdisk/mysql
ln -s /tmp/ramdisk/mysql/ /var/lib/mysql
@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 31, 2024 14:26 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@KL-7
KL-7 / lastfm.md
Created April 13, 2012 20:25
Hide Last.fm client's icon from dock when you close it on Mac OS X.

Add that to the bottom of the main dict section in Last.fm/Contents/info.plist file:

<key>LSUIElement</key>
<string>1</string>
@AndreasStokholm
AndreasStokholm / README.md
Created September 24, 2012 21:00 — forked from aronwoost/README.md
Auto-deploy with php and github on an Ubuntu Amazon EC2 box

##Auto-deploy with php and github on an Ubuntu Amazon EC2 box

Fork from other gist Build auto-deploy with php and git(hub) on an EC2 AMAZON AMI instance - Covers a basic Ubuntu isntall

When ever it says www-data below, it's the user Apache runs under. So if your apache user is called something else, change it to that.

##Install git

sudo aptitude install git-core
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: