Skip to content

Instantly share code, notes, and snippets.

View zoster's full-sized avatar

zoe zoster

  • rTraction
  • London ON
View GitHub Profile
.select2-container .select2-choice {
border: 2px solid #dce4ec;
font-family: "Lato", sans-serif;
font-size: 14px;
text-indent: 1px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
$(document).ready(function(){
var retina = window.devicePixelRatio > 1 ? true : false;
if(retina) {
$("html").addClass("retina");
$('img').each(function(){
$(this).attr("src", $(this).attr("src").replace("/l/", "/h/"));
});
}
});
@AndrewRayCode
AndrewRayCode / gist:3784055
Created September 25, 2012 19:53
jQuery plugin for shift + click to select multiple checkboxes
// Usage: $form.find('input[type="checkbox"]').shiftSelectable();
// replace input[type="checkbox"] with the selector to match your list of checkboxes
$.fn.shiftSelectable = function() {
var lastChecked,
$boxes = this;
$boxes.click(function(evt) {
if(!lastChecked) {
lastChecked = this;
@gavinblair
gavinblair / errors.php
Created May 4, 2012 20:05
Error Reporting: I'm always trying to remember how to do this
<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
@gavinblair
gavinblair / resend.php
Created June 13, 2011 21:22
Drupal - resend activation email
<?php
$uid = 120;
$user = user_load(array('uid' => $uid));
$op = 'status_activated';
_user_mail_notify($op, $user);
@kneath
kneath / ._what.md
Created December 4, 2009 18:23
Badass git pull alias (up) to show commit log that just got pulled in addition to changes

Badass git pull alternative

Add this little snippet to your ~/.gitconfig and it amps up your git pull by means of git up

  1. Adds in a list of the commits you're pulling down
  2. Auto-prunes remote branches
  3. Defaults to pull --rebase - gets rid of unnecessary merge commits. If you don't know what rebase does, this is probably safe for you. If you know what rebase does, you should know where this will not be safe for you.

Scott Chacon and Ryan Tomayko basically figured out how to do this and I am stealing all of the credit.