Skip to content

Instantly share code, notes, and snippets.

Mark Hayes mhayes

Block or report user

Report or block mhayes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mhayes / SassMeister-input.scss
Created Feb 5, 2014
Generated by
View SassMeister-input.scss
// ----
// libsass (v0.7.0)
// ----
// works in libsass, not in ruby sass
$text-direction: ltr;
$text-direction: ltr !default;
mhayes /
Created Apr 29, 2014
Setup SassC + LibSass on MacOSX (tested on 10.9.2 only)
# # Allow us to compile from source
wget "" -O $TMPFILE
unzip -d $PWD $TMPFILE
mhayes /
Last active Aug 29, 2015
Setup Foundation
#! /bin/sh
mkdir -p ~/Sites/zurb-foundation
cd ~/Sites/zurb-foundation
npm install bower grunt-cli -g
if [[ $rc != 0 ]] ; then
sudo npm install bower grunt-cli -g
echo "[SUCCESS] Installed bower and grunt";
mhayes /
Last active Aug 29, 2015
Need quick way to rename files according to a sequence?


Let's assume you have OS X screenshots named like Screen Shot 2015-06-09 at 9.39.56 AM.png. You can use this script to rename them like so:

mark:screens mark$ ruby renamer.rb 
move ./Screen Shot 2015-06-09 at 9.39.56 AM.png to EXAMPLE_ONE_160x600_1.png
move ./Screen Shot 2015-06-09 at 9.39.57 AM.png to EXAMPLE_ONE_160x600_2.png
move ./Screen Shot 2015-06-09 at 9.39.58 AM.png to EXAMPLE_ONE_160x600_3.png
move ./Screen Shot 2015-06-09 at 9.40.00 AM.png to EXAMPLE_ONE_160x600_4.png
mhayes / action_item.rb
Created Jun 15, 2010
A Mongoid implementation of meeting minutes
View action_item.rb
class ActionItem
field :due_date, :type => Date
field :completed, :type => Boolean
field :description
has_one_related :person
embedded_in :meeting, :inverse_of => :action_items
mhayes / sortOrder.js
Created Jul 1, 2010
Use to collect sort position from jqueryUI
View sortOrder.js
$(function() {
update:function(event,ui) {
var arr = $('#sortFields').sortable('toArray');
var newVal = "";
for(i=1; i<arr.length; i++) { newVal += arr[i] + ","; }
mhayes / migration.cfm
Created Jul 16, 2010
ColdFusion migrations idea
View migration.cfm
Database Migration Script:
Instructions here
<cfsavecontent variable="up">
<!--- The contents in this section will be used to apply your update --->
SELECT TOP 3 * FROM ats.vw_r
View col.cfc
component name="col" {
function init(
required string name,
required string displayName,
required string dataType="string",
required boolean canSort=false,
required boolean canDisplay=false
) {
variables.tbl = ""; =;
mhayes / base_template.rb
Created Aug 10, 2010
Rails3 application template
View base_template.rb
#sets up basic rails3 application structure with jquery-ujs
#remove index page
run "rm public/index.html"
@jquery_link = ""
@jquery_ujs_link = ""
#setup Gemfile
You can’t perform that action at this time.