Skip to content

Instantly share code, notes, and snippets.

View andypotanin's full-sized avatar
🇺🇲
Focusing

Andy Potanin andypotanin

🇺🇲
Focusing
View GitHub Profile
@andypotanin
andypotanin / git-deploy
Created May 9, 2016 10:45
Add this to your binary path to deploy things into "latest" branch quickly.
#!/usr/bin/env bash
## Deploy branch into "develop" branch
##
## Save Original Branch
ORIGINAL_BRANCH=$(git symbolic-ref --short HEAD)
echo "Deploying [${ORIGINAL_BRANCH}] into [latest]."
*.log
*.sql
sitemap.xml
sitemap.xml.gz
wp-content/backup-db/
wp-content/backups/
wp-content/blogs.dir/
wp-content/cache/
wp-content/upgrade/
wp-content/uploads/
{
"additional_room” {
“default”: “LFD_ROOMADDITIONAL_29”
“type”: “string”,
“multiple”: true,
“delimiter”: “,”
“values”: {
“Kitchen”: “Kitchen/Family Combo”,
“Dining Room”: “Formal Dining Room"
}
@andypotanin
andypotanin / some-template-file.php
Created July 31, 2015 21:09
This is some WordPress theme template file that demonstrates the use of "do_shortcode" to render a Property Search element for WP-Property.
<?php
/**
* This is some WordPress theme template file that demonstrates the use of "do_shortcode"
* to render a Property Search element for WP-Property.
*/
?>
<!-- some HTML may go here -->
<?php echo do_shortcode( '[property_search searchable_attributes="bedrooms,bathrooms" per_page=10]' ); ?>
# /opt/vendor/phpfarm/inst/php-5.3.22/bin
--with-regex=php \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-track-vars \
--enable-trans-sid \
--with-bz2 \
## Check all response codes for Docker containers.
##
##
## source <(curl -s https://gist.githubusercontent.com/andypotanin/e1876800b56acc63c462/raw)
function app.check {
for app in $( docker ps -q -f=status=running ); do
_hostname=$(docker inspect -f '{{ .Config.Hostname }}' $app);
_domainname=$(docker inspect -f '{{ .Config.Domainname }}' $app);
* PayPal calculates your revenue share based on your PayPal net total payment volume, instead of Net Revenue.
7000*100*0.009
<?php
/**
*
*
* @source https://gist.github.com/andypotanin/edad00eb3ff1c2a31f70
*/
header( 'cache-control:no-cache,no-store,private' );
die(json_encode(array(
#!/bin/bash
## export DB_USER=root
## export DB_PASSWORD=ktikfyefkieyknwi
## export DB_HOST=colossus.wpcloud.io
## exportDatabases root ktikfyefkieyknwi colossus.wpcloud.io
function exportDatabases {
export _databases=`mysql --user=${1} --pasword=${2} --host=${3} -e "SHOW DATABASES;" | tr -d "| " | grep -v Database`
require.config({
});
dmodule.config()