Skip to content

Instantly share code, notes, and snippets.

/*
Usage
-----
In your main scss file, add the following three lines.
$show-grid: true;
$container-id: container;
@import "grid";
To hide the grid background and borders, change the first line to
@mvance
mvance / install-citools.sh
Created October 22, 2011 16:40
A bash script to set up Quickstart as a continuous integration appliance.
#!/bin/bash
# Follow the steps below to configure Quickstart as a continuous integration appliance, complete with Jenkins,
# Selenium Builder, Selenium Server, PHPUnit, and Selenium Zoetrope. The script also configures and runs an
# example Jenkins test job for Quickstart's example6.dev site, including Simpletest module testing and
# Coder module checks.
#
# 1. Download Quickstart and follow the installation instructions:
# http://drupal.org/project/quickstart
# 2. Open a Terminal window (Applications > Accessories > Terminal) and run the following command:
@saetia
saetia / gist:1623487
Last active May 1, 2024 19:55
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@kostajh
kostajh / db_update.sh
Created February 28, 2012 21:06
Rebuild script for Drupal Install Profile
# This script facilitates obtaining the latest DB data from the production
# Drupal 5 site.
# The script gets an ordered dump of the D5 database, and commits it to the
# git@git.designhammer.net:mysite_d5.git repository master branch.
# We make use of the rebuild.config file, so please make sure that your
# settings are correct there!
# We also assume that your drush aliases are setup correctly for
# @mysite.dev and @mysite_d5.prod. Please check mysite.aliases.drushrc.example,
# make sure your @mysite.dev alias is set up correctly, rename the file
# to mysite.aliases.drushrc.php and move it into your ~/.drush directory.
@maxparm
maxparm / gist:2029829
Created March 13, 2012 16:41
JS - Jquery detect keypress enter
$('#element').on('keypress', function(e) {
if(e.which == 13) {
// action();
e.preventDefault();
}
});
@kostajh
kostajh / example.tasks.php
Created March 27, 2012 19:16
example.tasks.php
<?php
#!/usr/bin/env drush
// Example rebuild script
// local alias
$self_record = drush_sitealias_get_record('@self');
$self_name = '@' . $self_record['#name'];
@tenken
tenken / shortprofile.info
Created March 29, 2012 22:17
A Sample short profile that auto-fills the DB form, its a little ugly.
; dpg ::: http://drupal.org/user/1059226
; Example Short Profile -- hides database configuration page.
;
; This bears mentioning more than once. See http://drupal.org/node/1153646
name = Short Profile
description = A short profile, it removes DB settings page.
core = 7.x
dependencies[] = block
@DriesS
DriesS / javascript.js
Created May 24, 2012 12:41
Live keypress
$(document).ready(function() {
$('input').live('keydown', function(e) {
var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
if(key == 13) {
var inputs = $(this).parents("form").eq(0).find(":input:text,textarea:visible");
var idx = inputs.index(this);
if (idx == inputs.length - 1) {
inputs[0].select()
@katdowns
katdowns / keypress-slideshow
Created July 2, 2012 20:36
Next/Back on Keypress
// left/right key press
$(document).keydown(function(e) {
if (e.which == 37) { // left key
$('#slideshow').cycle('prev');
} else if (e.which == 39) { // right key
$('#slideshow').cycle('next');
}
});
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 26, 2024 11:01
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx