Skip to content

Instantly share code, notes, and snippets.

View Agenric's full-sized avatar
🎯
Focusing

Agenric Agenric

🎯
Focusing
View GitHub Profile
@Agenric
Agenric / .gitconfig
Last active August 22, 2017 17:45
Git
[user]
name = Agenric
email = Agenric@foxmail.com
[alias]
st = status
ck = checkout
cmm = commit -m
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg3 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'
@Agenric
Agenric / IDCardLastNumber.py
Last active June 27, 2017 02:10
计算身份证号最后一位
# 假设身份证号为:653-129-1987-0526-7513
temp = 6*7 + 5*9 + 3*10 + 1*5 + 2*8 + 9*4 + 1*2 + 9*1 + 8*6 + 7*3 + 0*7 + 5*9 + 2*10 + 6*5 + 7*8 + 5*4 + 1*2
print 'temp = ',temp
y = temp % 11
list1 = [1,0,'x',9,8,7,6,5,4,3,2]
print 'last = ', list1[y]
@Agenric
Agenric / math.h
Created June 7, 2017 08:20
C语言数学函数库
/************************************************************
* *
* Math Functions(数学函数) *
* *
***********************************************************/
#pragma mark --- 三角函数 a前缀表示取反 asin反三角函数
//TODO: 求反余弦值
extern float acosf(float);
extern double acos(double);
extern long double acosl(long double);
@Agenric
Agenric / findNumber.java
Last active June 7, 2017 14:11
二维有序数组查找数字
public class Main {
public static void main(String[] args) {
int [][] array = {
{1,2,3,4},
{2,3,4,5},
{4,6,8,9},
{6,7,8,9},
{12,15,25,26}
};