start new:
tmux
start new with session name:
tmux new -s myname
cat 'IdentityFile ~/.ssh/id_rsa' > ~/.ssh/config | |
chmod 600 ~/.ssh/config |
cat ~/.ssh/id_rsa.pub | ssh hostname 'cat >> ~/.ssh/authorized_keys' | |
-OR- | |
sh-copy-id -i ~/.ssh/id_rsa.pub username:password@remotehost.co.jp |
# Define a new alias for git tree, colorized and with graph | |
git config --global alias.tree 'log --graph --full-history --all --color --date=short --pretty=format:"%Cred%x09%h %Creset%ad%Cblue%d %Creset %s %C(bold)(%an)%Creset"' | |
# Then, invoke it | |
git tree | |
# Source: https://coderwall.com/p/4-itow/nice-terminal-git-tree-graph |
#!/bin/bash | |
# store the current dir | |
CUR_DIR=$(pwd) | |
# Let the person running the script know what's going on. | |
echo -e "\n\033[1mFetching in latest changes for all repositories...\033[0m\n" | |
# Find all git repositories and update it to the master latest revision | |
for i in $(find . -name ".git" | cut -c 3-); do |
minikube start --kubernetes-version=v1.7.0 --extra-config=apiserver.Authorization.Mode=RBAC | |
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default | |
minikube dashboard |
import jenkins.model.* | |
i = 1 | |
def matchedJobs = Jenkins.instance.items.findAll { job -> | |
job.name =~ /my_regex_here/ | |
} | |
matchedJobs.each { job -> | |
println i++ + " >> This job will be deleted: " + job.name |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
# Base settings and GC logging | |
-server -XX:+AlwaysPreTouch # First should be default, but we make it explicit, second pre-zeroes memory mapped pages on JVM startup -- improves runtime performance | |
# -Xloggc:gc-%t.log # CUSTOMIZE LOCATION HERE - $path/gc-%t.log -- the %t in the gc log file path is so we get a new file with each JVM restart | |
-XX:NumberOfGCLogFiles=5 -XX:+UseGCLogFileRotation -XX:GCLogFileSize=20m # Limits the number of files, logs to folder | |
-XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCCause | |
-XX:+PrintTenuringDistribution -XX:+PrintReferenceGC -XX:+PrintAdaptiveSizePolicy # gather info on object age & reference GC time for further tuning if needed. | |
# G1 specific settings -- probably should be default for multi-core systems with >2 GB of heap (below that, default is probably fine) | |
-XX:+UseG1GC | |
-XX:+UseStringDeduplication |
None of the string methods modify this
– they always return fresh strings.
charAt(pos: number): string
ES1
Returns the character at index pos
, as a string (JavaScript does not have a datatype for characters). str[i]
is equivalent to str.charAt(i)
and more concise (caveat: may not work on old engines).