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
cd folder-containing-wordpress | |
git fetch --tags | |
git checkout x.y.x | |
cd ../ | |
git add folder-containing-wordpress | |
git commit -m "Upgrade WordPress to x.y.z" | |
git push | |
# To fetch a submodule when you changed the version locally, git pull isn't enough | |
cd folder-containing-wordpress |
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
new Ajax('../wp-content/plugins/postmash-custom/saveList.php', { | |
new Ajax('/wp-content/plugins/postmash-custom/saveList.php', { |
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
mysqldump database-name | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' > output.sql |
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
# Not working | |
wp_enqueue_style( 'tell-a-friend', get_option('siteurl').'/wp-content/plugins/wp-tell-a-friend-popup-form/tell-a-friend.css'); | |
wp_enqueue_script( 'tell-a-friend-form', get_option('siteurl').'/wp-content/plugins/wp-tell-a-friend-popup-form/tell-a-friend-form.js'); | |
wp_enqueue_script( 'tell-a-friend-popup', get_option('siteurl').'/wp-content/plugins/wp-tell-a-friend-popup-form/tell-a-friend-popup.js'); | |
# Working | |
wp_enqueue_style( 'tell-a-friend', plugins_url( 'tell-a-friend.css', __FILE__ ) ); | |
wp_enqueue_script( 'tell-a-friend-form', plugins_url( 'tell-a-friend-form.js', __FILE__ ) ); | |
wp_enqueue_script( 'tell-a-friend-popup', plugins_url( 'tell-a-friend-popup.js', __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
# Change | |
require_once '../../../wp-load.php'; | |
# into | |
require_once '../../../different-dir/wp-load.php'; |
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
mysqldump --routines --no-create-info --no-data --no-create-db --skip-opt <database> > outputfile.sql |
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 ZabbixApi (http://zabbixapi.confirm.ch/) | |
require 'ZabbixApiAbstract.class.php'; | |
require 'ZabbixApi.class.php'; | |
try { | |
// connect to Zabbix API | |
$api = new ZabbixApi("..."); |
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 | |
fromVersion=$1 | |
if [ -d .sql-update ] | |
then | |
start=false | |
for sqlFile in `ls -v .sql-update/*` | |
do | |
if [[ $sqlFile == *$fromVersion* ]] |
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 | |
class EnvStream | |
{ | |
private $var, $position = 0; | |
function stream_open($path, $mode, $options, &$opened_path) | |
{ | |
$this->var = parse_url( $path, PHP_URL_HOST ); | |
return true; |
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
# .bashrc | |
[ -z "$PS1" ] && return |
OlderNewer