On Mac, Homebrew is the de-facto package manager, and Homebrew Cask is the app manager. I’m going to use Cask to install Java 7 and 8.
Install Homebrew Cask first if you haven’t:
brew update
brew tap caskroom/cask
import ch.qos.logback.classic.Level; | |
import ch.qos.logback.classic.LoggerContext; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.util.List; | |
/** | |
* change log level at runtime | |
* Created by nkcoder on 10/8/16. |
func init() { | |
rand.Seed(time.Now().UnixNano()) | |
} | |
func retry(attempts int, sleep time.Duration, f func() error) error { | |
if err := f(); err != nil { | |
if s, ok := err.(stop); ok { | |
// Return the original error for later checking | |
return s.error | |
} |
import ( | |
"fmt" | |
"log" | |
"os" | |
"sort" | |
) | |
// askForConfirmation uses Scanln to parse user input. A user must type in "yes" or "no" and | |
// then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as | |
// confirmations. If the input is not recognized, it will ask again. The function does not return |
git init # 初始化本地git仓库(创建新仓库) | |
git config --global user.name "xxx" # 配置用户名 | |
git config --global user.email "xxx@xxx.com" # 配置邮件 | |
git config --global color.ui true # git status等命令自动着色 | |
git config --global color.status auto | |
git config --global color.diff auto | |
git config --global color.branch auto | |
git config --global color.interactive auto | |
git config --global --unset http.proxy # remove proxy configuration on git | |
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库 |
current_branch=`git rev-parse --abbrev-ref HEAD` | |
git show-branch -a | grep '*' | grep -v $current_branch | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//' |
FROM debian:jessie | |
ENV USER=boatswain USER_ID=1000 USER_GID=1000 | |
# now creating user | |
RUN groupadd --gid "${USER_GID}" "${USER}" && \ | |
useradd \ | |
--uid ${USER_ID} \ | |
--gid ${USER_GID} \ | |
--create-home \ |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
/* | |
AnnotationClassMapBuilder extends the default class map builder and override byDefault method to lookup for more metadata | |
*/ | |
public class AnnotationClassMapBuilder<A, B> extends ClassMapBuilder<A, B> { | |
protected AnnotationClassMapBuilder(Type<A> aType, Type<B> bType, PropertyResolverStrategy propertyResolver, | |
DefaultFieldMapper[] defaults) { | |
super(aType, bType, propertyResolver, defaults); | |
} |