start new:
tmux
start new with session name:
tmux new -s myname
// @variables | |
$background-color: #000000; | |
$blue: #000000; | |
$red: #000000; | |
$border-color: #000000; | |
$font-family: sans-serif; | |
$font-light: 300; | |
$font-normal: 400; | |
$font-bold: 700; |
<?php | |
// if CabbageCMS, include Mobile Detect class | |
include_once ABSPATH . 'wp-admin/includes/plugin.php'; | |
if ( is_plugin_active( 'cabbagecms/cabbage-cms.php' ) ) { | |
include ABSPATH . 'wp-content/plugins/cabbagecms/_/inc/mobile-detect/Mobile_Detect.php'; | |
} | |
// Put stuff in <head> | |
function header_inject() { ?> |
#!/bin/sh | |
# scaffold.sh | |
# | |
# Usage: ./scaffold.sh <dirname> | |
# Created by Jason Ingram on 7/3/15. | |
# | |
dir=$1 | |
mkdir -p $dir/{fonts,inc,dev,js,css/scss,images/{working,source}} |
#!/bin/bash | |
# bckup.sh | |
# requires s3cmd | |
# backup db and site files to backups dir | |
# set variables | |
client='CLIENT' | |
db='DATABASE' | |
dbu='DATABASEUSER' | |
dbpw='PASSWORD' |
<?php | |
$post_type = 'Tours'; | |
$singular = 'Tour'; | |
$taxonomy = 'Adventures'; | |
$singulartax = 'Adventure'; | |
$for_post_type = $post_type; | |
add_action( 'init', 'cptui_register_my_cpts' ); |
#!/bin/bash | |
# Change 'www' and 'theme' to match your env | |
# Useage: ./deploy.sh <dir> <subdir> | |
# On completion, paste clipboard contents at prompt to go to repo | |
# Set variables to match your environment | |
www="Q4/Stash" | |
theme="offgrid" | |
# Store passed arguments |
#!/bin/bash | |
# Create secure password at variable length | |
# Useage: `password <length>' | |
length=$1 | |
env LC_CTYPE=C tr -dc "a-zA-Z0-9&*(){}_+?><~;\!@#$%^" < /dev/urandom | head -c $length > /tmp/password.txt | |
cat /tmp/password.txt | pbcopy |
#!/bin/sh | |
if [ "$#" -eq 1 ]; then stdinmsg=$(cat); fi | |
exec <"$0" || exit; read v; read v; read v; exec /usr/bin/osascript - "$@" "$stdinmsg"; exit | |
-- another way of waiting until an app is running | |
on waitUntilRunning(appname, delaytime) | |
repeat until my appIsRunning(appname) | |
tell application "Messages" to close window 1 | |
delay delaytime | |
end repeat |
<?php | |
$ar = []; | |
$args = array( | |
'orderby' => 'id', | |
); | |
$terms = get_terms( 'category', $args ); | |
foreach ( $terms as $term ) : | |
$ar[$term->name] = $term->term_id; |