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 Connector { | |
protected function __construct() { | |
$this->add_class_hooks(); | |
} | |
/** | |
* Add actions/filters from the methods of this class based on doc blocks |
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 | |
header("Content-Type: text/plain"); | |
// Decode the payload | |
$payload = json_decode( $_POST ); | |
# Include config file if found | |
@include( __DIR__ . '/deploy-config.php' ); | |
// Ability to choose a custom branch to track / deploy from, in the webhook registered URL |
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
[alias] | |
preview ="!f() { git branch -D preview; git fetch; git checkout preview; git merge -; git push; /path/to/wp-vip-preview/bin/deploy-preview.sh > /dev/null 2>&1; git checkout -; }; f" |
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
# switch to vip git branch | |
git checkout vip | |
# pull updates | |
svn up | |
# reset working tree | |
svn revert --recursive . | |
# try to merge the previous branch ( ie: GNDEV-88 ), but do not auto commit | |
git merge - --no-commit --no-ff | |
# see the svn diff, before committing | |
svn diff | more |
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
echo "127.0.0.1 facebook.com" >> %Windir%\System32\drivers\etc\hosts | |
echo "127.0.0.1 myegy.to" >> %Windir%\System32\drivers\etc\hosts |
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 /tmp/ngrok; cd /tmp/ngrok; wget "https://api.equinox.io/1/Applications/ap_pJSFC5wQYkAyI0FIVwKYs9h1hW/Updates/Asset/ngrok.zip?os=linux&arch=386&channel=stable"; unzip ngrok.zip; ngrok -proto=tcp 22 |
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
# Update from SVN repo | |
svn up | |
# Commit the updates into Git repo, using the last revision id of SVN | |
git add .; git commit -m r`svn info $url | grep 'Last Changed Rev' | awk '{ print $4; }'` -n | |
# Merge the feature branch, after CR | |
git merge origin/FEATURE-BRANCH | |
# Run grunt or any pre-svn-commit steps |
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
# navigate to VVV/www folder | |
cd /path/to/vvv/www | |
# ssh into vagrant | |
vagrant ssh | |
# cd to www directory | |
cd /srv/www | |
# create a directory for the new site |
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
document.getElementsByClassName('fbPhotosPhotoActionsItem')[document.getElementsByClassName('fbPhotosPhotoActionsItem').length-1].click(); setTimeout(function(){ document.getElementsByClassName('layerConfirm')[0].click() }, 500); |
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 | |
# Install script for Latest WordPress by Johnathan Williamson - extended by Don Gilbert | |
# Disclaimer: It might not bloody work | |
# Disclaimer 2: I'm not responsible for any screwups ... :) | |
# DB Variables | |
echo "MySQL Host:" | |
read mysqlhost | |
export mysqlhost |