Skip to content

Instantly share code, notes, and snippets.

View program247365's full-sized avatar
πŸ’­
YOLO πŸ’―

Kevin Ridgway program247365

πŸ’­
YOLO πŸ’―
View GitHub Profile
@nickawalsh
nickawalsh / _settings.sass
Created August 24, 2012 09:55
Style Debugging
%debug
background-color: pink !important
@HKLF4
HKLF4 / audio_tag.rb
Created August 27, 2012 09:54
Octopress HTML5 Audio Tag
# Title:
# Octopress HTML5 Audio Tag
# http://antoncherkasov.me/projects/octopress-plugins
# Author:
# Anton Cherkasov
# http://antoncherkasov.me
# [email protected]
# Syntax:
# {% audio url/to/mp3 %}
# {% audio url/to/mp3 url/to/ogg %}
@pablohart
pablohart / SpriteAlignCenter.sass
Created September 12, 2012 12:33
Compass Sprites
$sprites-nameofimage-position: 50%
h2
+sprites-sprite(nameofimage, $offset-x: 50%, $offset-y: 0px)
@pablohart
pablohart / SpriteAlignBottom.sass
Created September 12, 2012 12:39
Compass Sprites 2
h2
+sprites-horiz-sprite(nameofimage, $offset-y: 100%)
@ttscoff
ttscoff / planter.rb
Created September 22, 2012 17:57
Create directory trees from indented text input
#!/usr/bin/ruby
=begin
Planter v1.3
Brett Terpstra 2013
ruby script to create a directory structure from indented data.
Three ways to use it:
- Pipe indented (tabs or 2 spaces) text to the script
- e.g. `cat "mytemplate" | planter.rb
- Create template.tpl files in ~/.planter and call them by their base name
@adamgit
adamgit / .gitignore
Last active March 20, 2025 10:01
.gitignore file for Xcode4 / OS X Source projects
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.6
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
@nrrrdcore
nrrrdcore / retina_bg.css
Created November 15, 2012 06:50
Retina-Ready Background Swatching (Minus the Bullshit)
background-image: url('../images/[email protected]');
background-size: 150px 124px; /* size in px of image @1X */
@ericelliott
ericelliott / env-examples.md
Last active March 7, 2025 23:39
env-examples

Most configuration really isn't about the app -- it's about where the app runs, what keys it needs to communicate with third party API's, the db password and username, etc... They're just deployment details -- and there are lots of tools to help manage environment variables -- not the least handy being a simple .env file with all your settings. Simply source the appropriate env before you launch the app in the given env (you could make it part of a launch script, for instance).

env files look like this:

SOMEVAR="somevalue"
ANOTHERVAR="anothervalue"

To source it:

$ source dev.env # or staging.env, or production.env, depending on where you're deploying to

@paulirish
paulirish / gist:4158604
Created November 28, 2012 02:08
Learn JavaScript concepts with recent DevTools features

Learn JavaScript concepts with the Chrome DevTools

Authored by Peter Rybin , Chrome DevTools team

In this short guide we'll review some new Chrome DevTools features for "function scope" and "internal properties" by exploring some base JavaScript language concepts.

Closures

Let's start with closures – one of the most famous things in JS. A closure is a function, that uses variables from outside. See an example: