start new:
tmux
start new with session name:
tmux new -s myname
| #!/usr/bin/env ruby | |
| require "bundler/inline" | |
| gemfile do | |
| source "https://rubygems.org" | |
| gem "tty-logger", "~> 0.6" | |
| gem "pry" | |
| gem "dotiw" |
| #! /bin/bash | |
| ### ATTENTION : NOT READY FOR PRODUTION YET ### | |
| ### LINODE ACCEPTS BUT THEN BROWSERS SHOW ### | |
| ### SSL_ERROR_RX_RECORD_TOO_LONG ### | |
| DOMAIN="example.com" | |
| CERT_DIR="/opt/acme/certs/$DOMAIN" | |
| TOKEN="XXXXXXXXXX" | |
| NB_ID=XXXXX |
| (evil-define-command evil-ex (&optional initial-input) | |
| :keep-visual t | |
| :repeat abort | |
| (interactive | |
| (list | |
| (let ((s (concat | |
| (cond | |
| (current-prefix-arg | |
| (let ((arg (prefix-numeric-value current-prefix-arg))) | |
| (cond ((< arg 0) (setq arg (1+ arg))) |
| aws ec2 describe-instances | jq -r '.Reservations[].Instances[] | select(.State.Name |contains("running")) | select(.Tags != null) | (.Tags | from_entries) as $tags | [.PrivateIpAddress,$tags.Name,.KeyName] | @tsv' |
| (defun add-project-to-projectile-known-projects (_ directory) | |
| (projectile-add-known-project directory)) | |
| (advice-add 'magit-clone :after 'add-project-to-projectile-known-projects) |
| #!/bin/bash | |
| # Author: CzBiX | |
| # URL: https://gist.github.com/CzBiX/e64256b23687bb13da02 | |
| # Support only Ubuntu 16.04 | |
| DEST_PACKAGE="libglib2.0-0" | |
| DEST_VERSION="2.48.1-1~ubuntu16.04.1" | |
| DEST_FILE="/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4800.1" | |
| PATCH_DATA="f626c: eb" | |
| SUCCESS_MSG="Please quit nautilus with 'nautilus -q' to make sure patch worked." |
I'd like to share some git aliases that you might find useful if you handle pull requests from others.
Add these to your ~/.gitconfig in the [alias] section:
copr = "!f() { git fetch -fu origin refs/pull/$1/head:pr-$1; git checkout pr-$1; } ; f"
prunepr = "!git for-each-ref refs/heads/pr-* --format='%(refname:short)' | while read ref ; do git branch -D $ref ; done"
Now you can "git copr #{pr_number}" (check out pull request is the mnemonic) and it will pull down the PR in a local branch of pr-#{pr_number} and check it out for you. To do it right, you must pronounce it "Copper" with a James Cagney gangster accent.
| #!/usr/bin/env python | |
| # Authored by Chad Smith on 3/10/2015 | |
| # please feel free to contact me at [email protected] with comments or questions | |
| # assumes you have already run aws configure or are running in an ec2 role | |
| import boto.ec2, sys | |
| region = sys.argv[1] | |
| secgroup = sys.argv[2] | |
| conn = boto.ec2.connect_to_region(region) | |
| allgroups = conn.get_all_security_groups() |