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
SELECT SUM(LENGTH(post_content) - LENGTH(REPLACE(post_content, ' ', '')) + 1) as 'Word Count' FROM `wp_posts` WHERE post_status='publish' AND post_type='post'; |
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
s/([^,]+),\s+(.*)/\2 \1/ |
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 | |
// Override default header. | |
function custom_default_header() { | |
// Get the default header. | |
ob_start(); | |
thesis_default_header(); | |
$output = ob_get_clean(); | |
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 | |
/** | |
* Filters HTML adding URL parameters to links beginning with a base URL. | |
* | |
* The HTML source code is parsed with a regex replacement which updates the | |
* "href" attribute of all links whose URL begins with the base URL, adding | |
* the given data to the URL in the form of GET parameters. | |
* | |
* Glossary: |
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 | |
// Define path to application directory | |
defined('APPLICATION_PATH') | |
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application')); | |
// Define application environment | |
defined('APPLICATION_ENV') | |
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production')); |
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
mkdir -p wav && for a in *.flac; do flac -d -o "wav/`basename -s .flac $a`.wav" "$a"; done |
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
chmod +a "group:<group name>:allow:delete,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown,list,search,add_file,add_subdirectory,delete_child,read,write,append,execute,file_inherit,directory_inherit" <directory | file> |
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
class OnDestroyMiddleware | |
def initialize(app, env) | |
@app = app | |
end | |
def call(env) | |
`knife client show #{env["config"].chef.node_name}` | |
if $?.to_i == 0 | |
env.ui.info "Removing client #{env["config"].chef.node_name}" | |
`knife client delete #{env["config"].chef.node_name} -y` |
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
$('h1, h2').html(function(i, h) { | |
return h.replace(/\?/g, '<span class="question-mark">?</span>'); | |
}); |
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 | |
# Add this hook to /usr/share/git-core/templates/hooks to enable for all new repositories. | |
REPO_URL=`echo $PWD | sed 's:/hooks$::'` /usr/share/redmine/script/runner /usr/share/redmine/extra/update_repository.rb -e production > /dev/null 2>&1 & |
OlderNewer