I hereby claim:
- I am qianyan on github.
- I am lambeta (https://keybase.io/lambeta) on keybase.
- I have a public key whose fingerprint is 960A DEDD EBAA BFBC E67E E66A B845 5D1D 3C50 30FF
To claim this, I am signing this object:
import groovy.text.SimpleTemplateEngine | |
import org.yaml.snakeyaml.Yaml | |
buildscript { | |
repositories { | |
mavenLocal() | |
mavenCentral() | |
} | |
dependencies { |
pub mod two_sum_bst { | |
use std::rc::Rc; | |
use std::cell::RefCell; | |
#[derive(Debug, PartialEq, Eq)] | |
pub struct TreeNode { | |
pub val: i32, | |
pub left: Option<Rc<RefCell<TreeNode>>>, | |
pub right: Option<Rc<RefCell<TreeNode>>>, | |
} |
local svn_info='$(svn_prompt_info)' | |
local color_svn_info=%{$reset_color%}${svn_info}%{$reset_color%} | |
if [[ $PROMPT != *${svn_info}* ]] | |
then | |
PROMPT=$PROMPT${color_svn_info} | |
fi | |
ZSH_THEME_SVN_PROMPT_PREFIX="%{$fg_bold[blue]%}svn:(" | |
ZSH_THEME_SVN_PROMPT_SUFFIX="%{$fg_bold[blue]%})" | |
ZSH_THEME_SVN_PROMPT_DIRTY="%{$fg[red]%} ✘ %{$reset_color%}" |
const _ = require('lodash') | |
const fs = require('fs') | |
var Lazy = require('lazy') | |
const swaggerDoc = "your.yaml" | |
const prefixOfURI = "/" | |
new Lazy(fs.createReadStream(swaggerDoc)) | |
.lines | |
.map( l => l.toString().trim().slice(0, -1) ) // delete the last char ':' | |
.filter(line => line.startsWith(prefixOfURI) || ['get', 'post', 'put', 'patch', 'delete'].includes(line) ) |
// frequency | |
Stream.of("a", "a", "b", "c").collect(toMap(identity(), a -> 1, (a, b) -> a + b)); | |
Stream.of("a", "a", "b", "c").collect(groupingBy(identity(), counting())); | |
Stream.of("a", "a", "b", "c").collect(groupingBy(identity(), summingInt(v -> 1))); | |
Stream.of("a", "a", "b", "c").collect(groupingBy(identity(), mapping(identity(), summingInt(v -> 1)))); | |
-> {a=2, b=1, c=1} | |
// unique? | |
frequency().values().stream().anyMatch(c -> c > 1); |
I hereby claim:
To claim this, I am signing this object:
SourceTreeSetup_1.6.20.exe /extract | |
msiexec /a SourceTreeSetup_1.6.20.msi /qb TARGETDIR="%temp%\SourceTree" | |
xcopy "%temp%\SourceTree" "C:\Dev\sourceTree" /S | |
rmdir "%temp%\SourceTree" /S |
# open with chrome | |
open -a 'Google Chrome' `cat .git/config | awk '/url/{print $3}'` | |
# open with default browser | |
open `cat .git/config | awk '/url/{print $3}'` | |
# alias | |
alias gon="cat .git/config | awk '/url/{print \$3}' | xargs open" |