start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/env python | |
# Clone or update all a user's gists | |
# curl -ks https://raw.github.com/gist/5466075/gist-backup.py | USER=fedir python | |
# USER=fedir python gist-backup.py | |
import json | |
import urllib | |
from subprocess import call | |
from urllib import urlopen | |
import os |
#!/bin/bash | |
# A simple script to backup an organization's GitHub repositories. | |
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files | |
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up | |
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API) | |
GHBU_PASSWD=${GHBU_PASSWD-"<CHANGE-ME>"} # the password for that account | |
GHBU_GITHOST=${GHBU_GITHOST-"<CHANGE-ME>.github.com"} # the GitHub hostname (see notes) | |
GHBU_PRUNE_OLD=${GHBU_PRUNE_OLD-true} # when `true`, old backups will be deleted | |
GHBU_PRUNE_AFTER_N_DAYS=${GHBU_PRUNE_AFTER_N_DAYS-3} # the min age (in days) of backup files to delete |
Hi:
perl -e 'print "hello world!\n"'
A simple filter:
perl -ne 'print if /REGEX/'
Filter out blank lines (in place):
function transfer | |
if test (count $argv) -eq 0 | |
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md" | |
return 1 | |
end | |
## get temporarily filename, output is written to this file show progress can be showed | |
set tmpfile ( mktemp -t transferXXX ) | |
## upload stdin or file |
#!/bin/bash | |
# exec &> ~/logfile.txt | |
# In iTerm2 Session preferences <Advanced> pane setup Semantic History to: | |
# | |
# [Run coprocess...] | |
# ~/dot/item2_open_file_in_emacs.sh +\2 \1 | |
if [[ $1 == "+" ]]; then |
Listing pods with kubectl get pods
, then select a pod name and copy paste it into kubectl logs [pod name]