- Wordpress
- Roku
- iOS
- Android
Cache third-party requests.
| #!/bin/bash | |
| # command to sync ssh keys | |
| echo "What's the user?" | |
| read user | |
| cat ~/.ssh/id_rsa.pub | ssh $user 'cat - >> ~/.ssh/authorized_keys' |
| .posts-by-cat { | |
| width: 653px; | |
| display: flex; | |
| flex-direction: row; | |
| flex-wrap: wrap; | |
| font-family: inherit; | |
| ul { | |
| list-style-type: none; | |
| margin-top: 52px; |
| (function ($) { | |
| $(document).ready(function(){ | |
| $('.secondary-link').each(function() { | |
| var link = $(this).data('href'), | |
| anchor = $(this).data('title'); | |
| $(this).attr( 'title', anchor ); | |
| $(this).css( 'cursor', 'pointer' ); |
| <?php | |
| $ar = []; | |
| $args = array( | |
| 'orderby' => 'id', | |
| ); | |
| $terms = get_terms( 'category', $args ); | |
| foreach ( $terms as $term ) : | |
| $ar[$term->name] = $term->term_id; |
| #!/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 |
| #!/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/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 |
| <?php | |
| $post_type = 'Tours'; | |
| $singular = 'Tour'; | |
| $taxonomy = 'Adventures'; | |
| $singulartax = 'Adventure'; | |
| $for_post_type = $post_type; | |
| add_action( 'init', 'cptui_register_my_cpts' ); |