Skip to content

Instantly share code, notes, and snippets.

View buzzedword's full-sized avatar
:octocat:
Live and in stereo

Danny Garcia buzzedword

:octocat:
Live and in stereo
View GitHub Profile
@buzzedword
buzzedword / gist:2246110
Created March 30, 2012 03:04
Twitter Bootstrap: Grid Overlay
/*
* Grid Overlay for Twitter Bootstrap
* Assumes a 1.692em baseline grid (22px/13px)
*/
@media (min-width: 1200px) {
body {
background: -webkit-linear-gradient(
90deg,
rgba(0,0,0,0.05),
rgba(0,0,0,0.05) 4.545%,
@buzzedword
buzzedword / .zshrc
Created May 15, 2012 20:04
Oh-my-zsh configuration
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Example aliases
@buzzedword
buzzedword / debugMode.js
Created May 18, 2012 18:51
Debug module for enabling and disabling console on the fly. Useful for server environment settings.
DebugModule: {
!
function(undefined) {
// Global debug object. Enable and disable console functionality. Defaults to off.
var Debug = function(bool) {
var func = {},
state = undefined,
Console = undefined,
// Common console functionality.
consoleFunctionality = {
@buzzedword
buzzedword / youtube_swfobject.js
Created May 18, 2012 21:17
Youtube player snippet
var player = function(selector, dimensions) {
var $yt = $(selector);
$yt.each(function() {
var $this = $(this);
var _data = $this.data();
var params = {
allowScriptAccess: "always",
wmode: 'opaque',
controls: 0,
@buzzedword
buzzedword / .twitter-bootstrap
Created May 23, 2012 19:18
One of these days, I'll turn this into an actual script.
# Requires UglifyJS and LESSCSS
alias reduce="cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-modal.js js/bootstrap-dropdown.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-button.js js/bootstrap-collapse.js js/bootstrap-carousel.js js/bootstrap-typeahead.js | uglifyjs -o js/bootstrap-concat.min.js -nc"
alias twitter-bootstrap-full="clear && echo 'Cloning the Twitter Bootstrap...' && git clone git://github.com/twitter/bootstrap.git && echo 'Switching version to 2.0.3...' && cd bootstrap && git checkout v2.0.3 && echo 'Reducing javascript files to a single concatinated version...' && reduce && echo 'Creating initial bootstrap.css...' && mkdir css && lessc less/bootstrap.less css/bootstrap.css && echo 'Final cleanup...' && rm LICENSE Makefile README.md package.json .gitignore .travis.yml js/README.md && rm -rf .git docs js/tests less/tests && cd ../ && echo 'Twitter bootstrap setup completed.'"
@buzzedword
buzzedword / piracy.js
Created June 22, 2012 15:43
Downloading Calvin & Hobbs
// On http://imgur.com/a/EYCTw
// Open Console
var downloadString = '';
$('.image-hover.download a').each(function(i){
downloadString += 'echo "Downloading '+ (i+1) + '.jpg..."\n\r';
downloadString += 'curl -L http://www.imgur.com' + $(this).attr('href') +' -o '+ (i+1) + '.jpg\n\r';
downloadString += 'echo "Finished! Waiting 3 seconds before continuing..."\n\r';
downloadString += 'echo \n\r';
downloadString += 'sleep 3 \n\r';
@buzzedword
buzzedword / Bash crap.sh
Created June 25, 2012 15:48
Initial setups
# Xcode
open http://itunes.apple.com/us/app/xcode/id497799835?mt=12
# Homebrew
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
# Git
brew install git
# Git Flow
var click_or_tap = function(obj) {
//for property in obj, add "click " to property and use original value
var new_obj = {};
for(var property in obj) {
if (obj.hasOwnProperty(property)) {
if (forge.is.mobile()) {
new_obj["tap " + property] = obj[property];
}
else {
new_obj["click " + property] = obj[property];
@buzzedword
buzzedword / grunt-recess.js
Created July 10, 2012 22:25
Grunt.js for grunt-recess
/*global module:false*/
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-recess');
var recessOptions = function(bool) {
bool = ((typeof bool === 'undefined')? false : bool);
var config = {
compile: true,
compress: bool,
@buzzedword
buzzedword / git-trackall
Created July 11, 2012 02:01
Add to a folder on your path, chmod 755, run with git trackall
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do git branch --track ${branch##*/} $branch; done
git fetch --tags
git fetch --all