Skip to content

Instantly share code, notes, and snippets.

😐
Haha

vamdt vamdt

😐
Haha
View GitHub Profile
@vamdt
vamdt / .editorconfig
Last active May 22, 2020
editor config
View .editorconfig
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
[*.java]
indent_style = space
@vamdt
vamdt / .ideavimrc
Last active Jul 5, 2019
ideavim config
View .ideavimrc
set hls
set ignorecase smartcase
set incsearch
set showmode
" minimum nr. of lines above and below cursor
set so=5
" enable vim-surround plugin
set surround
View cmder下git-for-windows乱码解决方案.md
  1. git status时中文文件名乱码

    现象:

    \344\275\240\345\245\275
    

    执行以下命令即可:

@vamdt
vamdt / city.rb
Last active Mar 14, 2019 — forked from sumskyi/README.md
rails4 sti, custom "type" column name and value
View city.rb
class City < GeoEntity
def self.sti_name
3
end
end
View ReConstructBinaryTree.java
package com.vamdt.fox.fox.of;
import java.util.HashMap;
import java.util.Map;
/**
* pre arr + in arr => tree
* in arr + post arr => tree
* pre arr + post arr => tree
*/
View ssh_auto_complete.sh
complete -W "$(echo `cat ~/.ssh/config | grep 'Host '| cut -f 2 -d ' '|uniq`;)" ssh
View gist:970dce78d3d7b7e02b3a3215c99ba4e8
#!/bin/bash
while true
do
if [[ $(($RANDOM % 2)) -eq 0 ]]
then
echo "000"
else
echo "111"
fi
View CompletableFutureTest.java
public class CompletableFutureTest {
static class User {
private String nickname;
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
@vamdt
vamdt / edit_distance.py
Created Sep 20, 2018
Dynamic programming
View edit_distance.py
def main():
result = edit_distance("fox", "fab")
print(result)
def edit_distance(str1, str2):
len1 = len(str1)
len2 = len(str2)
maxtrix = [[i for j in range(len2 +1)] for i in range(len1 + 1)]
maxtrix[0] = [i for i in range(len1 + 1)]
View 素书.md

素 书

原始章第一

夫道、德、仁、义、礼,五者一体也。
道者,人之所蹈,使万物不知其所由。
德者,人之所得,使万物各得其所欲。
仁者,人之所亲,有慈惠恻隐之心,以遂其生成。
义者,人之所宜,赏善罚恶,以立功立事。
礼者,人之所履,夙兴夜寐,以成人伦之序。\

You can’t perform that action at this time.