Skip to content

Instantly share code, notes, and snippets.

😀
Haha

vamdt vamdt

😀
Haha
Block or report user

Report or block vamdt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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

素 书

原始章第一

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

@vamdt
vamdt / Cmder踩坑记录.md
Last active Sep 12, 2018
Cmder踩坑记录
View Cmder踩坑记录.md

Cmder踩坑记录

  1. 执行超过4个字符长的命令,按up或者down之后第一个字符没有消失。

    解决方案:

    找到cmder安装目录 cmder\vendor\ 修改clink.lua文件

    将如下代码

You can’t perform that action at this time.