Skip to content

Instantly share code, notes, and snippets.

View elalemanyo's full-sized avatar
🥘

victor elalemanyo

🥘
View GitHub Profile
@widyakumara
widyakumara / waitUntilExists.js
Created September 25, 2012 17:27
Wait Until Exists Version v0.2
/*
*
* 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
@stansmet
stansmet / .siegerc
Created July 7, 2012 20:26
My siegerc
# 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:
@ykarikos
ykarikos / png2svg.sh
Created June 7, 2012 22:17
Convert png to svg using imagemagick and potrace
#!/bin/bash
if [ "$1" == "" ]; then
echo Usage: $0 pngfile
exit 0;
fi
FILE=`basename $1 .png`
if [ ! -e $FILE.png ]; then
@kellec
kellec / examples-and-output.css
Created April 12, 2012 02:10
a LESS mixin for versatile gradients (with IE support)
/* 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 -->
@snirgel
snirgel / jquery.mirrorvalue.js
Created March 14, 2012 11:03
Mirrors the input of an textfield, identified by id
/**
* @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';
@mrconnerton
mrconnerton / gist:1979037
Last active December 4, 2018 15:13
node form in ctools modal drupal 7
<?php
/*
Make Sure you include:
ctools_include('modal');
ctools_modal_add_js();
On the pages you put your link.
*/
@pascalduez
pascalduez / modulename.module
Created February 22, 2012 23:33
Drupal 7 - Add a cancel button on node forms
<?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(
@waako
waako / template.php
Created February 3, 2012 18:15
Drupal, get theme path in javascript
<?php
function theme_preprocess_page(&$variables) {
drupal_add_js('jQuery.extend(Drupal.settings, { "pathToTheme": "' . path_to_theme() . '" });', 'inline');
}
?>
@saetia
saetia / gist:1623487
Last active April 20, 2025 23:05
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