Skip to content

Instantly share code, notes, and snippets.

@seamusjr
seamusjr / foo.html
Created November 4, 2011 17:31
Test if argument passed is an HTMLElement or not using JQuery
<div class="foo">foo</div>
@seamusjr
seamusjr / non_user_selectable.css
Created November 9, 2011 17:08
Non-user selectable
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
@seamusjr
seamusjr / install.md
Created March 18, 2012 07:43
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, nvm

Setup new Mac with OSX Lion from scratch.

These commands are good as of 2012-03-18.

Install Xcode 4

The download/install takes a while so start it first. When it finishes downloading you will still need to run it to complete installation.

Note: Make sure you install the XCode Command Line Tools after XCode is done installing. To do this go to Xcodes -> Preferences -> Downloads -> Command Line Tools -> Install. If you don't you might not be able to install brew packages (i.e. brew install wget will fail).*

@seamusjr
seamusjr / gitworkflow.txt
Created August 7, 2012 21:06
Simple git workflow
# Git workflow example.
# Inspired by http://nakedstartup.com/2010/04/simple-daily-git-workflow
# Create a local working branch
# You only need to do when you want to create
# a local working branch for your project
#
# I use the convention feat_project_name so it can be feat_puma
git checkout -b branch_name_here
@seamusjr
seamusjr / gist:5051065
Created February 27, 2013 19:47
error in imagemagick output
MPlayer 1.1-4.2.1 (C) 2000-2012 MPlayer Team
Playing /Users/sroche/Sites/lge/lge-tv-poc/public/prototypes/media/tv.mov.
libavformat version 54.6.101 (internal)
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
VIDEO: [H264] 220x124 24bpp 29.970 fps 2243.4 kbps (273.9 kbyte/s)
Clip info:
major_brand: qt
minor_version: 537199360

Setup new Mac with OSX Lion from scratch

Latest update 20-Oct-2012. [email protected]

Command Line Tools are required for Homebrew. Previously it was suggested to download Xcode 4, but since the new version doesn't ship the proper gcc compiler for rvm, the command line tools are a better option and then using homebrew to get the gcc compiler. If preferred, install Xcode 4, although this setup doesn't follow that set of instructions.

Really the nicest choice for a terminal on OSX right now, especially with Lion style full screen support.

@seamusjr
seamusjr / fixTopLevelCategories.js
Last active December 24, 2015 02:49
DW: Fix top level category search refinements when SEO friendly links are on
//In app.js to fix top level category:
// handle events for updating grid
$cache.main.on("click", ".refinements a, .pagination a, .breadcrumb-refinement-value a", function (e) {
e.preventDefault();
if ($(this).parent().hasClass("unselectable")) { return; }
if (typeof $(this).attr('href') === 'undefined' || $(this).attr('href') == '') { return; }
var uri = app.util.getUri(this);
@seamusjr
seamusjr / gist:7936218
Created December 12, 2013 21:51
importing compass lib to access mixins
@import "compass/css3";
.spotlight {
background:orange;
@include border-radius(5px);
margin:0 auto;
width:200px;
}
@seamusjr
seamusjr / gist:10274539
Last active August 29, 2015 13:58
regex match number between 25 and 800
/^\s*[2-9][5-9]|1[0-9][0-9]|2[0-9][0-9]|3[0-9][0-9]|4[0-9][0-9]|5[0-9][0-9]|6[0-9][0-9]|7[0-9][0-9]|800*$/
@seamusjr
seamusjr / git-svn-cheatsheet.txt
Last active August 29, 2015 14:15
Git SVN cheatsheet
GIT SVN NOTES:
Merge:
-----------------------------
git checkout master
git svn rebase
git checkout MY_FEATURE
git rebase master
git checkout master