For Homebrew v2.6.x and below:
brew cask install ngrok
For Homebrew v2.7.x and above:
// check version | |
node -v || node --version | |
// list locally installed versions of node | |
nvm ls | |
// list remove available versions of node | |
nvm ls-remote | |
// install specific version of node |
# The list of commands to run in each tab of the terminal window | |
set cmdList to {"ssh user@host1.example.com", "ssh user@host2.example.com"} | |
# You can append to the list just to break up really long lines | |
# set cmdList to cmdList & {"ssh user@host3.example.com"} | |
tell application "iTerm2" | |
# Not sure how to create an "empty" window so for the window we pick the | |
# first command in the list |
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
'use strict'; | |
describe('mocha before hooks', function () { | |
before(() => console.log('*** top-level before()')); | |
beforeEach(() => console.log('*** top-level beforeEach()')); | |
describe('nesting', function () { | |
before(() => console.log('*** nested before()')); | |
beforeEach(() => console.log('*** nested beforeEach()')); | |
it('is a nested spec', () => true); | |
}); |
// ========================================================================= | |
// REMOVE JUNK FROM WORDPRESS HEAD | |
// ========================================================================= | |
// REMOVE WORDPRESS HEADER META: | |
remove_action('wp_head', 'rsd_link'); // remove really simple discovery link | |
remove_action('wp_head', 'wp_generator'); // remove wordpress version meta tag | |
remove_action('wp_head', 'feed_links', 2); // remove rss feed links (make sure you add them in yourself if youre using feedblitz or an rss service) | |
remove_action('wp_head', 'feed_links_extra', 3); // removes all extra rss feed links | |
remove_action('wp_head', 'index_rel_link'); // remove link to index page | |
remove_action('wp_head', 'wlwmanifest_link'); // remove wlwmanifest.xml (needed to support windows live writer) |
<?php | |
/** | |
* Close the connection to the browser but continue processing the operation | |
* @param $body | |
*/ | |
public function closeConnection($body, $responseCode){ | |
// Cause we are clever and don't want the rest of the script to be bound by a timeout. | |
// Set to zero so no time limit is imposed from here on out. | |
set_time_limit(0); |
#!/bin/bash | |
# node-reinstall | |
# credit: http://stackoverflow.com/a/11178106/2083544 | |
## program version | |
VERSION="0.0.13" | |
## path prefix | |
PREFIX="${PREFIX:-/usr/local}" |