Skip to content

Instantly share code, notes, and snippets.

View Olical's full-sized avatar
🧙‍♂️
(magic)

Oliver Caldwell Olical

🧙‍♂️
(magic)
View GitHub Profile
a.tag, span.tag {
display: inline-block;
text-decoration: none;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
padding: 4px 7px;
font-family: 'Helvetica Neue', helvetica, sans-serif;
font-size: 12px;
line-height: 14px;
height: 14px;
vertical-align: middle;
@Olical
Olical / Bad hosts file
Created January 5, 2012 11:04
Mac OS X Lion /etc/hosts bug
192.168.1.4 addr1 addr2 addr3
@Olical
Olical / gb-fix.css
Created January 27, 2012 11:42
CSS for pusing the Google bar up by two pixels to close that annoying gap
@-moz-document domain('google.com') {
#gb {
position: relative;
top: -2px;
}
}
@Olical
Olical / transitions.css
Created January 31, 2012 13:01
Just realised you can do this with transitions
transition: box-shadow, width, height, line-height, margin;
transition: 300ms ease;
@Olical
Olical / about.md
Created January 31, 2012 14:19
Fullscreen API class

This is a wrapper class for the fullscreen API. It should make it easier to use.

It is supported in the latest versions of Chrome and Safari. It will be supported in Firefox in version 10 (which is released tomorrow).

All calls to activate fullscreen have to be made from a user action. So a button click for example.

Here are some useful links. To run the example it has to be run on its own page, not an iframe. So I have linked to where the iframe points in jsFiddle.

@Olical
Olical / export.sh
Created February 13, 2012 17:49
Git helper scripts
#!/bin/bash
# Exports your repo, pass the repo path and export path
# Will bring submodules with it
rsync -av\
--exclude=.git*\
--exclude=.DS_Store\
$1 $2
@Olical
Olical / grid.py
Created April 4, 2012 22:20
Python grid classes
# Manages a grid of values
class Grid():
def __init__(self, width, height, default=''):
self.width = width
self.height = height
self.data = [[default for y in range(height)] for x in range(width)]
def set(self, x, y, value):
self.data[y][x] = value
@Olical
Olical / example.html
Created June 6, 2012 12:31
A 12 and 16 column CSS grid created in my generator: http://jsfiddle.net/Wolfy87/5nRrq/
<div class='row'>
<div class='span-12'>&nbsp;</div>
</div>
<div class='row'>
<div class='span-6'>&nbsp;</div>
<div class='span-6 last'>&nbsp;</div>
</div>
<div class='row'>
@Olical
Olical / LICENSE.txt
Created June 28, 2012 09:33 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
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
@Olical
Olical / LICENSE.txt
Created July 9, 2012 20:08 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
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