Skip to content

Instantly share code, notes, and snippets.

View sirkitree's full-sized avatar

Jerad Bitner sirkitree

View GitHub Profile
#!/bin/bash
# Sync a Drupal database and contents of files directory between two
# development environments.
#
# Execute this script on the destination (DEST) server.
# A MEMBERNAME.aliases.drushrc.php file is required on the SOURCE server.
# See http://gist.github.com/421721 and remove example.local alias
@nathansmith
nathansmith / check_all.js
Last active March 10, 2019 16:39
Used to check all checkboxes in a page.
// Paste into Firebug or Chrome Dev Tools console
// when viewing a page with multiple checkboxes.
(function(d) {
var input = d.querySelectorAll('input[type="checkbox"]');
var i = input.length;
while (i--) {
input[i].checked = true;
}
.background_clip
// Seriously, why isn't this just the
// freakin' default in all browsers?
+background-clip(padding-box)
// Not sure what this does? Have a looksie...
// http://compass-style.org/examples/compass/css3/background-clip
// Crucial, if you have rounded corners on something with
// both background color and a border. Without, background
@bangpound
bangpound / gist:1506800
Created December 21, 2011 17:09
Make Drupal 7 aggregation efficient again and use Google CDN for jQuery and jQuery UI
<?php
/**
* Implements hook_library().
*/
function MYMODULE_library() {
// jQuery UI from Google.
$libraries['ui'] = array(
'title' => 'jQuery UI: All',
'website' => 'http://jqueryui.com',
@rocketeerbkw
rocketeerbkw / gist:1591483
Created January 10, 2012 22:06
Test Drupal FAPI does not receive date when name attribute is removed
<?php
function stripe_test_menu() {
$items = array();
$items['stripe-test'] = array(
'title' => t('Stripe Test'),
'page callback' => 'drupal_get_form',
'page arguments' => array('stripe_test_form'),
'access callback' => TRUE,
@sirkitree
sirkitree / yammer.css
Created January 28, 2012 17:49
Userstyle for Yammer within Fluid
body,
div.page-content.two-column-layout,
div.page-content.three-column-layout {
background: none !important;
}
.two-column-layout #column-two {
margin-top: 0px !important;
padding-top: 0px !important;
}
o
_ | _
[| ◡ ◡ |]
_ - ⏝ - _
| |
| | | |
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@pixelwhip
pixelwhip / _variables.scss
Created April 18, 2012 05:34
Sample scss files for establishing a baseline for a new site. I've been starting every project with a variation of these files. They get refined each time and have proved super useful.
//
// @file
// Sitewide imports, variables and mixins.
//
@import "compass/css3";
@import "compass/typography";
@import "sassy-buttons";
@import "utilities";
@import "grids";
@sreynen
sreynen / basecamp.php
Created August 2, 2012 15:06
Time report
<?
require_once('basecamp/Basecamp.class.php'); // see http://code.google.com/p/basecamp-php-api/
$bc = new Basecamp('https://[subdomain].basecamphq.com/','[username]','[password]', 'simplexml');
$people = $bc->getPeopleForCompany([company ID]);
$person_id = array();
foreach ($people['body']->person as $person) {