start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/bash | |
# | |
# Open new Terminal tabs from the command line | |
# | |
# Author: Justin Hileman (http://justinhileman.com) | |
# | |
# Installation: | |
# Add the following function to your `.bashrc` or `.bash_profile`, | |
# or save it somewhere (e.g. `~/.tab.bash`) and source it in `.bashrc` | |
# |
property baseURL : "http://statusboard.dev/song?" | |
if application "Spotify" is running then | |
tell application "Spotify" | |
set theTrack to name of the current track | |
set theArtist to artist of the current track | |
set theAlbum to album of the current track | |
set theurl to spotify url of the current track | |
try | |
do shell script "/usr/local/bin/wget --delete-after \"" & baseURL & "&t=" & theTrack & "&a=" & theArtist & "&al=" & theAlbum & "\"" |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
require 'zeus/rails' | |
ROOT_PATH = File.expand_path(Dir.pwd) | |
ENV_PATH = File.expand_path('spec/dummy/config/environment.rb', __FILE__) | |
BOOT_PATH = File.expand_path('spec/dummy/config/boot', ROOT_PATH) | |
APP_PATH = File.expand_path('spec/dummy/config/application', ROOT_PATH) | |
class CustomPlan < Zeus::Rails | |
def test_environment |
find app config db spec test -type f -name '*.rb' -or -name '*.coffee' -or -name '*.erb' -or -name '*.jbuilder' -or -name '*.js' | xargs sed -i '' -E "s/[[:space:]]*$//" | xargs sed -i -E '$a\' |
# Original Rails controller and action | |
class EmployeesController < ApplicationController | |
def create | |
@employee = Employee.new(employee_params) | |
if @employee.save | |
redirect_to @employee, notice: "Employee #{@employee.name} created" | |
else | |
render :new | |
end |
class ApplicationController < ActionController::Base | |
before_action :set_radius_user_cache_key | |
# bunch-o-auth stuff goes here | |
private | |
def set_radius_user_cache_key | |
if current_user | |
cookies[:_radius_user_cache_key] = { value: current_user.cache_key, domain: :all, tld_length: 2 } |