Skip to content

Instantly share code, notes, and snippets.

View tkizm1's full-sized avatar

tkizm1 tkizm1

  • test
  • China
View GitHub Profile

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

# -*- 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
@tkizm1
tkizm1 / fix-exif.sh
Created May 2, 2017 09:46
dropbox to google photo exif Date Taken
#!/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;
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;
@tkizm1
tkizm1 / hmac_sha256.py
Created March 2, 2017 16:25
hmac sha256
#!/usr/bin/env python
# -*- coding: utf-8 -*-
payload = '''{
"ref": "refs/heads/master",
"before": "337fb2355f43dd74cb8d77fcd083854092086e57",
"after": "337fb2355f43dd74cb8d77fcd083854092086e57",
"compare_url": "",
"commits": [
{
@tkizm1
tkizm1 / ansible.yml
Last active February 24, 2017 05:19
---
- 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
@tkizm1
tkizm1 / keybase.md
Last active February 14, 2017 05:18
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:

@tkizm1
tkizm1 / handle.html
Created October 21, 2016 10:12
normal array to angular-ui-tree
<!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},
@tkizm1
tkizm1 / vimrc
Last active September 6, 2015 12:52
my vim config
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