This file contains hidden or 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
<? | |
/** | |
* Repeatable Custom Fields in a Metabox | |
* Author: Helen Hou-Sandi | |
* | |
* From a bespoke system, so currently not modular - will fix soon | |
* Note that this particular metadata is saved as one multidimensional array (serialized) | |
*/ | |
function hhs_get_sample_options() { |
This file contains hidden or 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
#!/bin/bash | |
# Place this script in dir: /usr/bin | |
# Change permissions: sudo chmod +x /usr/bin/MAMP-DOCK-INVISIBLE | |
# | |
# Ensure the MAMP 'Info.plist' file has the following entry: | |
# <key>LSUIElement</key> | |
# <string dock-visible="1">NO</string> | |
# | |
# Usage: |
This file contains hidden or 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
#!/system/bin/sh | |
# Copyright© 2011 Juwe11 | |
if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then | |
echo "2560,4096,6144,12288,14336,18432" > /sys/module/lowmemorykiller/parameters/minfree | |
fi | |
if [ -e /proc/sys/vm/swappiness ]; then | |
echo "50" > /proc/sys/vm/swappiness | |
fi |
This file contains hidden or 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
# Apache 2 Aliases - Reboot and Log helper | |
alias a2reboot='sudo apachectl restart && sudo httpd -S' | |
alias a2log='sudo cat /var/log/apache2/error_log'; |
This file contains hidden or 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 is stolen from jQueryUI 1.9 but works well by itself, it will add a Pseudo selector to select all data from a element | |
usage is | |
var data = $(".selector:data()"); | |
console.log(data); | |
*/ | |
$.extend( $.expr[ ":" ], { |
This file contains hidden or 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
// ------------------------------------------------------------------------ | |
// SET NAMESPACE TO AVOID CONFLICTS AND HOLD CONFIG VALUES | |
// ------------------------------------------------------------------------ | |
var App = App || {}; | |
// Basic Config and Language Options | |
App = { |
This file contains hidden or 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
/** | |
* Compare two arrays if the are equal even if the have different order. | |
* | |
* @link http://stackoverflow.com/a/7726509 | |
*/ | |
jQuery.extend({ | |
/** | |
* @param {array} a | |
* First array to compare. | |
* @param {array} b |
This file contains hidden or 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
/** | |
* Compare two arrays if the are equal even if the have different order. | |
* | |
* @link http://stackoverflow.com/a/7726509 | |
*/ | |
jQuery.extend({ | |
/** | |
* @param {array} a | |
* First array to compare. | |
* @param {array} b |
This file contains hidden or 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 | |
/** | |
* The Lex Autoloader (this is case-sensative) | |
*/ | |
class Lex_Autoloader | |
{ | |
protected static $load_path = './'; |
This file contains hidden or 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
$(document).ready(function(){ | |
var localserver = "blog.shawnc.org"; | |
if(window.pageTracker) | |
{ | |
$("a").not(".external").not("a[href^='http://"+localserver+"']").click(function(){ | |
$(this).attr("target", "blank"); | |
var url = $(this).attr("href").replace(/^http\:\/\/(www\.)*/i, ""); | |
pageTracker._trackPageview('/external/'+url); |