Skip to content

Instantly share code, notes, and snippets.

View gavinblair's full-sized avatar

Gavin Blair gavinblair

View GitHub Profile
$ ssh [email protected]
<enter password>
# cd ~
# curl -sS http://getcomposer.org/installer | php
# php ~/composer.phar
# cd /websites
# php ~/composer.phar create-project laravel/laravel your-project-name
# cd your-project-name
# php ~/composer.phar install
You are surrounded by many doors. Each door has a sign on it.
$ ls
You are surrounded by many doors. Each door has a sign on it:
..
websites
documents
desktop
@gavinblair
gavinblair / fors.js
Created June 13, 2013 19:16
I have a bunch of loops, for different arrays. I just need some counters. When I do this, jshint says my variables k and l are already defined. Should I move on to other letters of the alphabet? Is there a better way?
for(var k in myarray){
for(var l in myarray[k]){
//do something with myarray[k][l]
}
}
for(var k in someotherarray){
for(var l in someotherarray[k]){
//do something with someotherarray[k][l]
}
@gavinblair
gavinblair / .htaccess
Created May 9, 2013 15:53
Having trouble using svg files as background-images in css? Add these lines to your .htaccess file.
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
@gavinblair
gavinblair / grunt.md
Last active December 15, 2015 07:39
My Grunt Setup

March 22, 2013 - I've been learning Grunt. It's awesome - I created a setup that watches your javascript files. Every time you update a file, it lints everything with JSHint, minifies, and runs your QUnit tests.

Check it out!

gav

Comments?

@gavinblair
gavinblair / numfader.js
Last active December 15, 2015 04:59
Object Oriented Javascript Example
/*
*
* numfader
* by Gavin Blair
* http://github.com/gavinblair
*
* usage:
* //create a new numfader object on an element
* var myfader = new numfader(document.getElementById("mydiv"));
*
@gavinblair
gavinblair / hero.md
Last active December 15, 2015 04:50
Do You Want to be a Hero?

March 20, 2013 - That’s a silly question. Of course you do. Who doesn’t?

Explode Code

WELL, here’s your chance. This Friday, March 22nd, you have the opportunity to rescue some of London’s best and brightest developers from a pizza-less Hello World! You can even wear a cape.

And that’s not all. The Explode Code team is looking for ongoing sponsorship for 2 event streams, which each run on a quarterly basis. The awesome people at Big Viking Games have kindly offered up their sweet space for all of our events, but we still need some help feeding bellies while we’re feeding minds. We’re looking for a generous sponsor (or group of sponsors) who can help us continue our series and build a stronger, more collaborative and more innovative developer community here in London.

Here’s the breakdown:

@gavinblair
gavinblair / index.md
Last active December 15, 2015 04:29
Gavin Blair
@gavinblair
gavinblair / post.md
Last active December 15, 2015 04:29
Explode Code: Hello World

March 19, 2013 - On February 5, 2013 we had our first Explode Code Talks event. It was a huge success - over 50 people came to Big Viking Games to see five talks, eat pizza and mingle with other web/mobile/game developers.

This Friday, March 22nd will be a different kind of event called Hello World.

Hello World! is an opportunity to learn something new. Pick a programming language or framework that you don't know and build something with it - anything*!

Then, bring your work to this event, show it off like it's the next Facebook, and eat pizza!

This is an open event and everyone is invited to participate.

#box{
display: block;
height: 100px;
width: 100px;
background: green;
position: relative;
opacity: .5;
border: 2px solid blue;
}