start new:
tmux
start new with session name:
tmux new -s myname
| rsync --ignore-existing --dry-run --verbose -r SOURCE/* DESTINATION |
| $('.outdated-diff-comment-container').addClass('open'); |
| #!/bin/bash | |
| # Set the ROOM_ID & AUTH_TOKEN variables below. | |
| # Further instructions at https://www.hipchat.com/docs/apiv2/auth | |
| ROOM_ID=XXX | |
| AUTH_TOKEN=XXX | |
| MESSAGE="Hello world!" | |
| curl -H "Content-Type: application/json" \ |
| # Useful way to stub an endpoint with JSON contained in a file. | |
| import json | |
| f = open('/path/to/file.json', 'r') | |
| return json.load(f) |
| #!/bin/bash | |
| git grep -l replaceMe | xargs sed -i 's/replaceMe/replace.me/g' |
| source "https://rubygems.org" | |
| ruby "2.0.0" | |
| gem 'sinatra' | |
| group :production, :staging do | |
| gem 'oboe-heroku', '~> 0.9.10.0' | |
| end |
| git log -S"validate=True" -- boto/s3/connection.py |
Install the line_profiler module:
[driti@ubuntu ]$ pip install line_profilerAdd the @profile decorator and run:
[driti@ubuntu ]$ kernprof.py -l -v example.py| #!/usr/bin/env python | |
| import sys | |
| import subprocess | |
| def print_wiki_options(file) : | |
| subprocess.call("clear") | |
| with open(file, 'r') as f : | |
| for line in f: | |
| sys.stdout.write(line) |