Skip to content

Instantly share code, notes, and snippets.

View TopherGopher's full-sized avatar

Topher Sterling TopherGopher

View GitHub Profile
@joshkoenig
joshkoenig / pantheon_mass_update.php
Last active August 29, 2015 14:07
This is a simple PHP script that allows you to use Pantheon's Terminus CLI to update all your Drupal 7 sites. You can edit it if you would like to only deploy to the test env and double-check there.
<?php
// YOUR LOGIN INFO HERE:
$email = '';
$password = '';
// RUNNING IT FOR A PANTHEON ONE "ORGANIZATION": UNCOMMENT AND ADD YOUR UUID HERE
// $organiztion_uuid = 'some-org-uuid-here';
// helper function
function terminus_json($command) {
@rfay
rfay / gist:fb043e166daa68270494c7b8b9c0b35a
Created March 6, 2017 22:28
iterm setup for changing your background in a particular place
The basics of iterm profile switching are here: https://www.iterm2.com/documentation-automatic-profile-switching.html
I used this config for ssh-based profile switching: https://www.evernote.com/l/AA9QPrDKFGFGRI_QrTfVcAwOQsTAmrxz8PEB/image.png
I did this in .bashrc/.zshrc to handle kubectl switches. This might be a little iffy depending on your actual config and how you manage it.
function iterm2_print_user_vars() {
export kube_context=$(kubectl config current-context 2>/dev/null)
iterm2_set_user_var kube_context $kube_context