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
/** | |
* Makes sure the context is correct and set ordering to use custom fields | |
* | |
* Courtesy of Matt Wiebe's SD_Register_Post_Type class | |
* http://somadesign.ca | |
* | |
* @access public | |
* @return void | |
*/ | |
function context_fixer() |
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
/** | |
* Adds a body class 'not-logged-in' for guests. | |
* | |
* We use this because X | |
* | |
* @author Remkus de Vries | |
* @link http://remkusdevries.com/when-sharing-wordpress-related-code-snippets-i-can-haz-standards-please/ | |
* @param array $classes Existing body classes | |
* @return array Amended body classes | |
*/ |
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 | |
require_once "phing/Task.php"; | |
class RandomStringTask extends Task { | |
/** | |
* The length of the random string | |
*/ | |
private $length = 32; |
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 | |
$extensions = get_loaded_extensions(); | |
if( is_array($extensions) && sizeof($extensions) ) { | |
natcasesort($extensions); | |
foreach($extensions as $ext) { | |
echo "$ext <br />"; | |
} | |
} | |
?> |
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
#!/bin/sh | |
# | |
# Shell script that configures gnome-terminal to use solarized theme | |
# colors. Written for Ubuntu 11.10, untested on anything else. | |
# | |
# Solarized theme: http://ethanschoonover.com/solarized | |
# | |
# Adapted from these sources: | |
# https://gist.github.com/1280177 | |
# http://xorcode.com/guides/solarized-vim-eclipse-ubuntu/ |
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
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
COLOR_NONE="\[\e[0m\]" |
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
#!/usr/bin/env bash | |
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-10-04 | |
# | |
# _______________| noise : ambient Brown noise generator (cf. white noise). | |
# | |
# Usage: noise [minutes=59] [band-pass freq center=1786] [wave] | |
# ^minutes can be any positive integer. | |
# Command "noise 1" will display peak-level meter. | |
# | |
# Dependencies: play (from sox package) |
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 | |
/** Hack to remove spammers, based on removeUnusedAccounts.php by **/ | |
/** BjornW <burobjorn@burobjorn.nl> **/ | |
/** Original header info follows **/ | |
/** | |
* Remove unused user accounts from the database | |
* An unused account is one which has made no edits | |
* | |
* This program is free software; you can redistribute it and/or modify |
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
#!/bin/bash | |
# depends on speech dispatcher http://packages.ubuntu.com/precise/speech-dispatcher | |
# use crontab to run this script automatically every X times when you want to know the time | |
current=`date --date="now" +%H:%M`; | |
spd-say --pitch -90 --rate -30 --voice-type male1 "The current time is: $current" |
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
#!/bin/bash | |
# quick & dirty script to create multiple directories | |
# Load a file with one site per line | |
list=$(<sites.txt) | |
# add the list of sites to an array | |
myarray=( $list ) | |
# for every site in the array create a directory |
OlderNewer