start new:
tmux
start new with session name:
tmux new -s myname
#! /usr/bin/env bash | |
# shellcheck disable=SC2059 | |
set -euo pipefail | |
# Toggle all currently 'Active' network servcies (e.g., Wi-Fi, Ethernet | |
# connections, etc...) to "restart" them. We'll ignore any already 'Disabled' | |
# services, and toggle all of the others to 'Disabled' and then back to | |
# 'Enabled'. This has been found helpful when your VPN won't re-connect after | |
# undocking and re-docking your MacBook, for example. |
This should be one of the core features of Git, but for some reason it's impossible to figure out how to search for a string in your commit history and see the diffs that that string is in. Here's the best I've come up with:
To find which commits and which files a string was added or removed in:
git log -S'search string' --oneline --name-status
To see the diff of that
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
# Get everything ready on a Mac | |
brew install docker docker-machine docker-compose | |
# Create a new machine (based on the 1.8.1 boot2docker iso) | |
docker-machine create --driver vmwarefusion --vmwarefusion-memory-size 2048 --vmwarefusion-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v1.9.1/boot2docker.iso osxdock | |
# Bring the machine up | |
docker-machine start osxdock | |
# Configure Shell |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
This solution fixes the error caused by trying to run npm update npm -g
. Once you're finished, you also won't need to use sudo
to install npm modules globally.
Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.
module SomeRequest | |
class Real | |
def do_something | |
RequestCommon.base_request(...) | |
end | |
end | |
end |
require 'multi_json' | |
require 'fog/core' | |
require 'fog/openstackcommon/identity/adapters/authenticator_v2' | |
module Fog | |
module HpTng | |
module Authentication | |
module Adapters | |
module AuthenticatorV2 |
require "fog/openstack/rackspace/version" | |
module Fog | |
module Openstack | |
module Rackspace | |
class Identity < Fog::Service | |
US_ENDPOINT = 'https://identity.api.rackspacecloud.com/v2.0' | |
UK_ENDPOINT = 'https://lon.identity.api.rackspacecloud.com/v2.0' | |
requires :rackspace_username, :rackspace_api_key |