Skip to content

Instantly share code, notes, and snippets.

Kevin Tang tkisme

Block or report user

Report or block tkisme

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
View zhihu.py
# -*- coding: utf-8 -*-
# 作者:蓝色
# 链接:https://www.zhihu.com/question/37787176/answer/81607754
# 来源:知乎
# 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
#! /usr/bin/env python
from urlparse import urlsplit
from os.path import basename
import urllib2
@tkisme
tkisme / fix-exif.sh
Created May 2, 2017
dropbox to google photo exif Date Taken
View fix-exif.sh
#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
for i in $(ls *.png *.jpg);
do
echo $i;
#a=$(exiftool $i -createdate -T);
a=$(echo ${i%.*}|sed "s/[-|\.]/:/g")
echo $a;
View hmac.java
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.util.Formatter;
import java.io.BufferedReader;
import java.nio.charset.Charset;
import java.io.FileReader;
import java.math.BigInteger;
import javax.crypto.Mac;
View hmac_sha256.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
payload = '''{
"ref": "refs/heads/master",
"before": "337fb2355f43dd74cb8d77fcd083854092086e57",
"after": "337fb2355f43dd74cb8d77fcd083854092086e57",
"compare_url": "",
"commits": [
{
View ansible.yml
---
- hosts: bb.com, cc.com
vars:
- http_port: 80
- max_clients: 200
- project_root: /var/www/flask/wtf
remote_user: root
tasks:
- name: ensure apache is at the latest version
apt: name=nginx state=latest
@tkisme
tkisme / keybase.md
Last active Feb 14, 2017
keybase.md
View keybase.md

Keybase proof

I hereby claim:

  • I am tkisme on github.
  • I am tkisme (https://keybase.io/tkisme) on keybase.
  • I have a public key ASDU2Ikd_6RZnm8VJ-EymqJXJ00O3KLRVmxAcCRQcAHUbwo

To claim this, I am signing this object:

@tkisme
tkisme / handle.html
Created Oct 21, 2016
normal array to angular-ui-tree
View handle.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<script>
var result = [
{"id": 1,"title": "node1","father_node":null},
@tkisme
tkisme / vimrc
Last active Sep 6, 2015
my vim config
View vimrc
set nocompatible " be iMproved, required
" vundle setup {{{ "
filetype off " required
" set the runtime path to include Vundle and initialize
"set vimdirpath='~/.vim'
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
You can’t perform that action at this time.