Skip to content

Instantly share code, notes, and snippets.

@Aura7988
Aura7988 / .ycm_extra_conf.py
Created December 20, 2017 15:13 — forked from jassinm/.ycm_extra_conf.py
c++11 youcompleteme
import os
import ycm_core
from clang_helpers import PrepareClangFlags
# Set this to the absolute path to the folder (NOT the file!) containing the
# compile_commands.json file to use that instead of 'flags'. See here for
# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
# Most projects will NOT need to set this to anything; you can just change the
# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
compilation_database_folder = ''
@Aura7988
Aura7988 / download_s3_files.go
Last active September 19, 2018 14:31 — forked from lkrych/download_s3_files.go
download selected files from s3
package main
import (
"fmt"
"log"
"os"
"strings"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
@Aura7988
Aura7988 / git_diff.md
Created November 14, 2018 03:17 — forked from jhjguxin/git_diff.md
Git diff 比较不同版本的差异

Git 比较不同版本文件差异的常用命令格式:

git diff                                       查看尚未暂存的文件更新了哪些部分

git diff filename 查看尚未暂存的某个文件更新了哪些

git diff –cached                    查看已经暂存起来的文件和上次提交的版本之间的差异

git diff –cached filename 查看已经暂存起来的某个文件和上次提交的版本之间的差异
set filelink=%1
set filecolor=%1.png
ffmpeg -i %filelink% -r 24 -vf fps=24,scale=240:-1:flags=lanczos,palettegen -y %filecolor% && ffmpeg -v warning -i %filelink% -i %filecolor% -r 4 -lavfi fps=24,scale=240:-1:flags=lanczos[x];[x][1:v]paletteuse -y %filelink%.gif && del /F /S /Q %filecolor%
exit
@Aura7988
Aura7988 / tmux-cheatsheet.markdown
Created March 27, 2019 05:46 — forked from ryerh/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@Aura7988
Aura7988 / .vimrc
Created April 27, 2019 07:10 — forked from ericbn/.vimrc
Vim Powerline-like status line without the need of any plugin
" Statusline (requires Powerline font)
set statusline=
set statusline+=%(%{&buflisted?bufnr('%'):''}\ \ %)
set statusline+=%< " Truncate line here
set statusline+=%f\ " File path, as typed or relative to current directory
set statusline+=%{&modified?'+\ ':''}
set statusline+=%{&readonly?'\ ':''}
set statusline+=%= " Separation point between left and right aligned items
set statusline+=\ %{&filetype!=#''?&filetype:'none'}
set statusline+=%(\ %{(&bomb\|\|&fileencoding!~#'^$\\\|utf-8'?'\ '.&fileencoding.(&bomb?'-bom':''):'')
@Aura7988
Aura7988 / Ability Model.xmind
Created July 6, 2019 04:03 — forked from mcfog/Ability Model.xmind
软件技术人员能力模型
@Aura7988
Aura7988 / TrueColour.md
Created July 27, 2019 02:11 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
@Aura7988
Aura7988 / diffdir.sh
Created August 29, 2019 11:13
diffdir
#!/bin/bash
if [ $# -ne 2 ];then
echo "Usage:$0 dir1 dir2"
exit 1
fi
if [ ! -d $1 -o ! -d $2 ];then
echo "$1 or $2 is not derectory!"
exit 1
fi
@Aura7988
Aura7988 / .cvimrc
Created August 29, 2019 11:17
cvimrc
set noautofocus
let searchlimit = 42
let scrollstep = 175
map y yankDocumentUrl
map a createBookmark
map d closeTab
map D closeTabsToRight
map X closeTabsToLeft
map u lastClosedTab
map h goBack