This is now an actual repo:
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
#!/usr/bin/env bash | |
#styles | |
VP_NONE='\033[00m' | |
VP_RED='\033[01;31m' | |
VP_GREEN='\033[01;32m' | |
VP_YELLOW='\033[01;33m' | |
VP_PURPLE='\033[01;35m' | |
VP_CYAN='\033[01;36m' | |
VP_WHITE='\033[01;37m' |
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
# ========================================= | |
# Makers! Implement your own actions here. | |
# ========================================= | |
class playRadio(object): | |
def __init__(self, say, keyword): | |
self.say = say | |
self.keyword = keyword |
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
# wp-cli alias to push a local WP database to a staging site | |
pushstage() { | |
START=$(date +%s) | |
# make a backup of the current local database | |
# get current directory name, used for database and URL | |
current=${PWD##*/} | |
wp db export $current.sql | |
# rsync the local database to staging site | |
rsync $current.sql $current-s:~/ | |
# get the staging site URL for search replace |
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
# pull a production WP database to an existing local site | |
# uses current directory as theme path and ssh alias | |
pullprod() { | |
START=$(date +%s) | |
# get current directory name, used for database and URL | |
# TODO: use echo get_template_directory() and get characters from right to first / | |
current=${PWD##*/} | |
cd ~/Sites/$current | |
# make a backup of the current local database | |
wp db export _db.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
#!/usr/bin/env bash | |
# This function lets you easily create series of commands into a single call | |
# It will print each successive command, run it and, as long as it returned | |
# with code 0, continue to the next step. | |
# If any step fails, it will stop and let you pick it back up after you fix the | |
# issues. | |
# | |
# Example of script using this function: | |
# !/usr/bin/env bash |
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 | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
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
# http://stackoverflow.com/questions/354763/common-mysql-fields-and-their-appropriate-data-types | |
INT(11) for anything that is either an ID or references another ID | |
DATETIME for time stamps | |
VARCHAR(255) for anything guaranteed to be under 255 characters (page titles, names, etc) | |
TEXT for pretty much everything else. | |
VARCHAR(255) for emails | |
TIMESTAMP for dates, tracking creation or changes | |
DECIMAL(3,2) (unsigned) for 5-star rating value |
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
pear list -c phpunit | grep stable | awk '{print "phpunit/"$1}' | xargs pear uninstall ; pear install phpunit/phpunit |
NewerOlder