Helper setup to edit .yaml files with Vim:
List of general purpose commands for Kubernetes management:
#!/bin/bash | |
# | |
# check commit messages for pivotal tracker issue numbers formatted as [#stort-id]along with commit message | |
REGEX="\[#[0-9]*\]" | |
ERROR_MSG="[POLICY] The commit doesn't reference a PIVOTAL tracker issue" | |
while read OLDREV NEWREV REFNAME ; do | |
for COMMIT in `git rev-list $OLDREV..$NEWREV`; | |
do | |
MESSAGE=`git cat-file commit $COMMIT | sed '1,/^$/d'` |
Helper setup to edit .yaml files with Vim:
List of general purpose commands for Kubernetes management:
// For all the confusing Prometheus configuration and | |
// regular expressions, | |
// explained in examples. | |
// Remember, there are default values for each item if it's missing. | |
// regex is (.*), | |
// replacement is $1, | |
// separator is ; | |
// ,and action is replace |
First things first, I want to use ag to search through my project files. Coming from fzf, I like to have two bindings for this -- one that respects my projects .gitignore
and one that does not. The latter is helpful if I want to examine a built file or look at a node_module dependency while working on my js project.
I use an alias for file_rec
source to toggle the -u
flag on ag
. Now, <C-P>
searches in my git files, and <C-O>
searches everything.
" denite file search (c-p uses gitignore, c-o looks at everything)
map <C-P> :DeniteProjectDir -buffer-name=git -direction=top file_rec/git<CR>
map :DeniteProjectDir -buffer-name=files -direction=top file_rec
package db | |
// stdlib | |
import ( | |
"fmt" | |
"os" | |
) | |
// external | |
import ( |
** 匹配Unicode字符的正則表達式
這裡是幾個主要非英文語系字符範圍(google上找到的):
# GIT heart FZF | |
# ------------- | |
is_in_git_repo() { | |
git rev-parse HEAD > /dev/null 2>&1 | |
} | |
fzf-down() { | |
fzf --height 50% --min-height 20 --border --bind ctrl-/:toggle-preview "$@" | |
} |
I've taken the benchmarks from Matthew Rothenberg's phoenix-showdown, updated Phoenix to 0.13.1 and ran the tests on the most powerful machines available at Rackspace.
Framework | Throughput (req/s) | Latency (ms) | Consistency (σ ms) |
---|
# uname -a
Linux base 4.0.5-gentoo #1 SMP Wed Jul 1 02:23:16 JST 2015 x86_64 Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz GenuineIntel GNU/Linux
# emerge -pvq openldap openssh sssd sudo
[ebuild R ] net-nds/openldap-2.4.38-r2 USE="berkdb crypt gnutls ipv6 minimal sasl ssl syslog tcpd -cxx -debug -experimental -icu -iodbc -kerberos -odbc -overlays -perl -samba (-selinux) -slp -smbkrb5passwd" ABI_X86="(64) -32 (-x32)"