Skip to content

Instantly share code, notes, and snippets.

View growdigital's full-sized avatar
🏠
Working from home

Jake Rayson growdigital

🏠
Working from home
View GitHub Profile
@growdigital
growdigital / microclearfix.css
Created February 12, 2012 13:34
Micro Clearfix by Nicolas Gallagher
/* For modern browsers http://ow.ly/91hqf */
.cf:before,
.cf:after {
content:"";
display:table;
}
.cf:after {
clear:both;
}
/* For IE 6/7 (trigger hasLayout) */
@growdigital
growdigital / jakekeymap.sublime-keymap
Created February 28, 2012 13:34
Sublime Text user keymap
[
{ "keys": ["f8"], "command": "toggle_side_bar" }
]
@growdigital
growdigital / Preferences.sublime-settings
Created February 28, 2012 13:37
Sublime Text user settings
{
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"font_face": "Droid Sans Mono",
"ignored_packages":
[
"Vintage",
"Git",
"SFTP"
]
}
@growdigital
growdigital / sort-array.js
Created February 29, 2012 07:52
Sort an Array of Objects by Property Using sort(fn)
[
{ name: "Robin Van Persie", age: 28 },
{ name: "Theo Walcott", age: 22 },
{ name: "Bacary Sagna", age: 26 }
].sort(function(obj1, obj2) {
// Ascending: first age greater than the previous
return obj1.age - obj2.age;
});
// Returns:
// [
@growdigital
growdigital / kellum-image-replacement.css
Last active December 18, 2020 08:10
The Kellum Method!
/* Kudos to Scott Kellum & Jeffrey Zeldman
* http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ */
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
position: absolute;
}
@growdigital
growdigital / font-crusher.css
Created March 7, 2012 11:31
Necolas Font Crusher Image Replacement
.ir { border: 0; font: 0/0 a; text-shadow: none; color: transparent; background-color: transparent; }
@growdigital
growdigital / _directory.php
Created May 4, 2012 11:19
PHP Directory listing
<?php
/* Function that reads directory content and
returns the result as links to every file in the directory
also it disply type wheather its a file or directory
for any help please contact Chetan Akarte... */
function DirDisply($data) {
$TrackDir=opendir('.');
while ($file = readdir($TrackDir)) {
if ($file == '.' || $file == '..' || $file == '.DS_Store') {
// do nothing
@growdigital
growdigital / smacss-sass-headings.scss
Created May 4, 2012 17:33
SMACSS Sass headings
///////////////////////////////////////////////////////////////////////////////////
//
// 88888888ba db ad88888ba 88888888888
// 88 "8b d88b d8" "8b 88
// 88 ,8P d8'`8b Y8, 88
// 88aaaaaa8P' d8' `8b `Y8aaaaa, 88aaaaa
// 88""""""8b, d8YaaaaY8b `"""""8b, 88"""""
// 88 `8b d8""""""""8b `8b 88
// 88 a8P d8' `8b Y8a a8P 88
// 88888888P" d8' `8b "Y88888P" 88888888888
@growdigital
growdigital / gist:2936863
Created June 15, 2012 14:57 — forked from lucasfais/gist:1207002
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
@growdigital
growdigital / Contract Killer 3.md
Created November 7, 2012 13:39
Jake's take on Andy Clarke's 'Killer Contract' for web developers & designers

Contract Killer 3

Revised date: 07/11/2012

Between us [company name]
and you [customer name]

Summary

We’ll always do our best to fulfil your needs and meet your expectations but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.