This assumes you've got docker-machine installed, running, and can do docker run
docker run --name travis-debug -dit quay.io/travisci/travis-ruby /sbin/init
docker exec -it travis-debug bash -l
| <html> | |
| <head> | |
| </head> | |
| <body> | |
| <script src="lib/yourlib.js"></script> | |
| <script> | |
| window.onload = function () { | |
| EntryPoint.run(); | |
| }; | |
| </script> |
| /* global ReactRedux, Redux, ReactDOM */ | |
| // "Getting Started with Redux" (by Dan Abramov) | |
| // https://egghead.io/series/getting-started-with-redux | |
| // This file on JSBin (by Jesse Buchanan): | |
| // http://jsbin.com/wuwezo/74/edit?js,console,output | |
| //////////////////////////////////////////////// | |
| // |
| /* | |
| The following code will require @gmail.com as domain | |
| for user registrations. | |
| You can change @gmail.com to any provider you want. | |
| The code below requires a user email to be collected during registration | |
| */ | |
| add_action('um_before_new_user_register', 'require_google_email_for_signup'); |
| add_action('um_account_pre_update_profile', 'did_user_change_email', 10, 2 ); | |
| function did_user_change_email( $changes, $user_id ) { | |
| $data = get_userdata($user_id); | |
| if ( isset( $changes['user_email'] ) && $data->user_email != $changes['user_email'] ) { | |
| // user e-mail changed! Do something | |
| } | |
| } |
| <?php | |
| namespace Codeception\Module; | |
| /** | |
| * Additional methods for DB module | |
| * | |
| * Save this file as DbHelper.php in _support folder | |
| * Enable DbHelper in your suite.yml file | |
| * Execute `codeception build` to integrate this class in your codeception | |
| */ |
| #!/usr/bin/env ruby | |
| # | |
| # CLI tool for locating and removing a Homebrew installation | |
| # It replaces the official uninstaller, which is insufficient and often breaks | |
| # If files were removed, the script returns 0; otherwise it returns 1 | |
| # | |
| # http://brew.sh/ | |
| # | |
| # Copyright (C) 2025 Stephen C. Benner | |
| # |
| <?php | |
| #Add a query var to sniff requests | |
| add_filter( 'query_vars', 'my_query_var_callback', 10, 1 ); | |
| function my_query_var_callback( $vars ){ | |
| $vars[] = 'dynamic_js'; | |
| return $vars; | |
| } | |
| #Dynamic JavaScript | |
| add_rewrite_rule( '^assets/js/dynamic\.js$', 'index.php?dynamic_js=1', 'top' ); //Note the hidden query variable |
| #!/bin/bash | |
| # args | |
| MSG=${1-'deploy from git'} | |
| BRANCH=${2-'trunk'} | |
| # paths | |
| SRC_DIR=$(git rev-parse --show-toplevel) | |
| DIR_NAME=$(basename $SRC_DIR) | |
| DEST_DIR=~/Sites/wp-plugins/$DIR_NAME/$BRANCH |
| #!/usr/bin/env python | |
| # saved to ~/bin/batcharge.py and from | |
| # http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity | |
| #!/usr/bin/env python | |
| # coding=UTF-8 | |
| import math, subprocess | |
| p = subprocess.Popen(["ioreg", "-rc", "AppleSmartBattery"], stdout=subprocess.PIPE) | |
| output = p.communicate()[0] |