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
[ -r /etc/bashrc ] && source /etc/bashrc | |
[ -r /etc/bash_completion ] && source /etc/bash_completion | |
[ -r ~/.git-completion.bash ] && source ~/.git-completion.bash | |
[ -r ~/.git-prompt.sh ] && source ~/.git-prompt.sh | |
[ -r /usr/local/rvm/scripts/rvm ] && source /usr/local/rvm/scripts/rvm | |
__has_parent_dir () { | |
# Utility function so we can test for things like .git/.hg without firing up a | |
# separate process | |
test -d "$1" && return 0; |
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 | |
/** | |
* Uku functions and definitions | |
* | |
* Change note: | |
* @see line 31 - 40 remove register nav_menu, this is merge into inc/nav-menu.php | |
* @see line 987 - 990 require nav-menu.php | |
* | |
* @package Uku | |
* @since Uku 1.0 |
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 | |
/** | |
* Load template or assets | |
* | |
* @param $tpl | |
* @param $type | |
*/ | |
function load_plugin_assets( $tpl, $type = 'php' ){ | |
$default_tpl = $tpl . '.’ . $type; |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# add a trailing slash to /wp-admin | |
RewriteRule ^(?:([_0-9a-zA-Z-]+)/?){0,2}wp-admin$ $1/wp-admin/ [R=302,L] | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -d |
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 # -*- coding: utf-8 -*- | |
namespace [PLUGIN]\Addons; | |
class Loader { | |
/** | |
* @var array | |
*/ | |
const ADDONSPATH = '/../Addons/'; |
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 | |
/** | |
* validate the last modification of this file | |
* on modification flush rewrite rules | |
* | |
* @return void | |
*/ | |
function _flush_rules() { | |
$o = __CLASS__; |
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 | |
add_filter( 'logfile_path', function(){ return __DIR__ . '/log/'; } ); | |
add_filter( 'logfile_name', function(){ return 'app.log'; } ); | |
wp_logger( __LINE__, 'Log msg' ); | |
/** | |
* log easy a msg | |
* | |
* @param int $line the linenumer |
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 | |
# Show all the colours of the rainbow, should be run under bash | |
for STYLE in 0 1 2 3 4 5 6 7; do | |
for FG in 30 31 32 33 34 35 36 37; do | |
for BG in 40 41 42 43 44 45 46 47; do | |
CTRL="\033[${STYLE};${FG};${BG}m" | |
echo -en "${CTRL}" | |
echo -n "${STYLE};${FG};${BG}" | |
echo -en "\033[0m" | |
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
#!/bin/bash | |
# Create a DB backup and a working development DB-Dump before | |
# installing a WordPress Projekt with Composer and WPCLI. | |
# | |
# Author: René Reimann <[email protected]> | |
project="renreim" | |
tdl="$project.de" | |
local_tdl="$project.dev" | |
prefix="wp_" |