Skip to content

Instantly share code, notes, and snippets.

// This is bloody ugly, but it works! Hooray!
// One of the early NEHE tutorials, compiled using:
// gcc -framework GLUT -framework OpenGL triangle_square_colour_rotate.c -o triangle_square_colour_rotate -Wall
#include <stdio.h>
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h> /* glut.h includes gl.h and glu.h*/
# Add the following to your .bash_profile for auto-completion
# (e.g. mvimgem <tabtab>)
#
# Modified to work with mvim instead of Textmate
# Original: http://effectif.com/articles/opening-ruby-gems-in-textmate
_mvimgem()
{
local curw
COMPREPLY=()
@adonaldson
adonaldson / paromoan_macro
Created November 17, 2009 22:55
PAROMOAN! (A raid-leader macro for raid-rolling)
/script ChatThrottleLib:SendChatMessage('BULK', 'paromoan', 'Raid roll numbers:', 'RAID') for ii=1,GetNumRaidMembers(),1 do local n=GetRaidRosterInfo(ii);ChatThrottleLib:SendChatMessage('BULK','paromoan', ('' .. ii .. '. ' .. n), 'RAID') end
/* SASS */
#main_navigation
ul
margin: 0
padding: 0
list-style: none
li
width: 102px
height: 22px
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Event do
it "should be refillable if the event is floating and not complete" do
event = Event.new(:complete => false)
event.stub!(:floating?).and_return true
event.should be_refillable
end
@adonaldson
adonaldson / qw.scpt
Created November 8, 2011 22:41
Linkinus script to set iChat as away when off to play Quake. How very '98!
on linkinuscmd(ipAddress)
set AppleScript's text item delimiters to ""
set iChatActive to false
set theString to "/me is not currently running iChat"
tell application "Finder"
if (get name of every process) contains "iChat" then set iChatActive to true
end tell
if iChatActive then
@adonaldson
adonaldson / gist:4014472
Created November 5, 2012 00:06
MMO thoughts
What do I remember being so good about MMOs?
Identifiers that say something about me (Race chosen, name, class, abilities, weapons, armour, appearance)
A 'home' - somewhere to idle after questing. Somewhere where it's likely to bump into friends, or other people I 'know' / recognise.
Meet people who are different but with shared goals.
"Group of friends that I met in game. Similar situations, complementing skills, similar attitudes, etc. Usually introduced by someone helping someone else out."
World effects (e.g. Weather) - something that happens on a regional scale that is noticeable by everyone nearby
These are the steps I took to get the HSBC Bookmarklet (http://dies-el.co.uk/hsbc_bookmarklet) installed.
1. Get a copy of John Gruber's perl script to create bookmarklets (I've copied it and created a gist)
$ git clone git://gist.github.com/316867.git make-bookmarklet
2. Get a copy of Andrew Donaldson's HSBC auto logger inner
$ git clone git://gist.github.com/266260.git hsbc-bookmarklet
@joseluisq
joseluisq / export_vscode_extesions.md
Last active May 6, 2024 01:34
How to export your VS Code extensions from terminal

How to export your VS Code extensions from terminal

Note: Unix-like systems only.

  1. Export your extensions to a shell file:
code --list-extensions | sed -e 's/^/code --install-extension /' > my_vscode_extensions.sh
@vasanthk
vasanthk / System Design.md
Last active May 6, 2024 01:32
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?