This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function( $, window, undefined ) { | |
"use strict"; | |
/** | |
* display jqueryui dialog based alert | |
*/ | |
window.dialog_alert = function( message, options ) { | |
var defaultOpts = { | |
title : "Alert", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// trim strings | |
if ( String.prototype.trim == undefined ) { | |
String.prototype.trim = function() { return this.replace(/(^\s+|\s+$)/g,''); } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.Key = { | |
"BACKSPACE" : 8, | |
"TAB" : 9, | |
"ENTER" : 13, | |
"SHIFT" : 16, | |
"CTRL" : 17, | |
"ALT" : 18, | |
"PAUSE/BREAK" : 19, | |
"CAPS_LOCK" : 20, | |
"ESCAPE" : 27, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// counteract magic quotes if they are enabled (http://www.php.net/manual/en/security.magicquotes.disabling.php#71817) | |
if (get_magic_quotes_gpc()) { | |
function undoMagicQuotes($array, $topLevel=true) { | |
$newArray = array(); | |
foreach($array as $key => $value) { | |
if (!$topLevel) { | |
$key = stripslashes($key); | |
} | |
if (is_array($value)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// recursive ajax (based on code from from http://stackoverflow.com/a/4414911) | |
function recursiveAjax( arrSettings, commonSettings, raData ) { | |
if ( typeof raData === "undefined" ) raData = { total: arrSettings.length }; | |
raData.index = raData.total - arrSettings.length; | |
var currentSettings = arrSettings.shift(); // Remove the first item from the Array. | |
var defaultSettings = { raTimeout: 100, raFinished: function( raData ){/* do nothing */} }; | |
var settings = $.extend( {}, defaultSettings, commonSettings, currentSettings ); | |
setTimeout( function() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code is free software; you can redistribute it and/or modify it under | |
# the terms of the new BSD License. | |
# | |
# Copyright (c) 2010, Sebastian Staudt | |
# A nano configuration file to enable syntax highlighting of some Git specific | |
# files with the GNU nano text editor (http://www.nano-editor.org) | |
# | |
# Save this file to a directory of your choice and add it to your nanorc using | |
# include ${PATH_TO_THE_FILE}/git.nanorc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://herdrick.tumblr.com/post/24563032599/display-git-branch-and-dirty-status-in-fish-shell | |
set fish_git_dirty_color red | |
function parse_git_dirty | |
git diff --quiet HEAD ^&- | |
if test $status = 1 | |
echo (set_color $fish_git_dirty_color)":"(set_color normal) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function( $, window, undefined ) { | |
"use strict"; | |
/** | |
* Set DEBUG_LVL and Show/Hide debugging DOM Elements | |
*/ | |
window.setDebugLevel = function( level ) { | |
level = parseInt( level, 10 ); | |
window.DEBUG_LVL = isNaN(level) ? 0 : level; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|^(http(s)?:)?//|i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @desc Enable/Disable/View Bitwise Flags | |
* (Useful when you need a group of true/false values) | |
* @author Jeremie J. Jarosh | |
* | |
* NOTE: slightly modifyed from code provided by 'wbcarts at juno dot com' | |
* (http://www.php.net/manual/en/language.operators.bitwise.php#108679) | |
*/ | |
class BitwiseFlag { |
OlderNewer