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
/* | |
* | |
* DMW: | |
* http://javascriptisawesome.blogspot.nl/2011/07/faster-than-jquerydocumentready-wait.html | |
* http://pastebin.com/raw.php?i=XTDKbQvK | |
* | |
* Wait Until Exists Version v0.2 - http://javascriptisawesome.blogspot.com/ | |
* | |
* | |
* TERMS OF USE - Wait Until Exists |
# Updated by Siege 2.72, July-07-2012 | |
# Copyright 2000-2007 by Jeffrey Fulmer, et al. | |
# | |
# Siege configuration file -- edit as necessary | |
# For more information about configuring and running | |
# this program, visit: http://www.joedog.org/ | |
# | |
# Variable declarations. You can set variables here | |
# for use in the directives below. Example: |
#!/bin/bash | |
if [ "$1" == "" ]; then | |
echo Usage: $0 pngfile | |
exit 0; | |
fi | |
FILE=`basename $1 .png` | |
if [ ! -e $FILE.png ]; then |
/* Basic two stop gradient */ | |
.example-gradient { | |
.linear-gradient(150deg, #eee, #aaa); | |
} | |
/* Outputs */ | |
.example-gradient { | |
background: -webkit-linear-gradient(150deg, #EEE 0%, #AAA 100%); | |
background: -moz-linear-gradient(150deg, #EEE 0%, #AAA 100%); | |
background: -ms-linear-gradient(150deg, #EEE 0%, #AAA 100%); | |
background: -o-linear-gradient(150deg, #EEE 0%, #AAA 100%); |
<!doctype html> | |
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
<html> | |
<head> | |
<title>iOS 8 web app</title> | |
<!-- CONFIGURATION --> |
/** | |
* @author Karina Mies | |
* @description Mirrors the input of an textfield, identified by id | |
*/ | |
jQuery.fn.mirrorValue = function(){ | |
return this.each(function(){ | |
var lCurrentText, lId, lMirrorClass; | |
jQuery(this).keyup(function(e) { | |
lId = '#'+jQuery(this).attr('id'); | |
lMirrorClass = '.'+jQuery(this).attr('id')+'-mirror'; |
<?php | |
/* | |
Make Sure you include: | |
ctools_include('modal'); | |
ctools_modal_add_js(); | |
On the pages you put your link. | |
*/ |
<?php | |
/** | |
* Implements hook_form_alter(). | |
*/ | |
function modulename_form_alter(&$form, &$form_state, $form_id) { | |
// You might want to filter by content type. | |
if ($form_id == 'ctype_node_form') { | |
// Add a cancel button. | |
$form['actions']['cancel'] = array( |
<?php | |
function theme_preprocess_page(&$variables) { | |
drupal_add_js('jQuery.extend(Drupal.settings, { "pathToTheme": "' . path_to_theme() . '" });', 'inline'); | |
} | |
?> |