Skip to content

Instantly share code, notes, and snippets.

@kiyor
kiyor / AES.go
Created May 7, 2018 08:13 — forked from shautzin/AES.go
AES/CBC/PKCS5Padding implementation by Golang
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"fmt"
)
func main() {
#!/bin/bash
############################################
# File Name : buildcurl.sh
# Purpose :
# Creation Date : 04-07-2016
# Last Modified : Thu Apr 7 16:38:10 2016
@kiyor
kiyor / nginx_vhost.conf
Last active August 29, 2015 14:26
nginx_lua_ubyk
server {
listen 80;
server_name yourservername;
charset UTF-8;
location ~ ^/p($|roxy$) {
default_type 'application/x-ns-proxy-autoconfig';
lua_code_cache on;
content_by_lua_file '/usr/local/nginx/conf/lua/proxy.lua';
}
location = /proxy.pac {
* * * * * if [[ `ip route show | wc -l` -lt 100 ]]; then /config/auth/routeadd.sh >/dev/null 2>&1; fi;
30 2 * * * /config/auth/unblockyouku.sh
@kiyor
kiyor / go-recaptcha.go
Created May 26, 2015 19:18
// idea by 'github.com/graetzer/go-recaptcha' with optomize, but might not fit for everyone
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
* File Name : recaptcha.go
* Purpose :
* Creation Date : 03-22-2015
* Last Modified : Sun 22 Mar 2015 09:43:16 PM PDT
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#!/bin/bash
############################################
# File Name : buildluajit.sh
# Purpose :
# Creation Date : 03-14-2014
# Last Modified : Fri 14 Mar 2014 07:17:12 PM UTC
@kiyor
kiyor / go_clients.go
Last active August 29, 2015 13:56
golang basic multi client run queue
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
* File Name : main.go
* Purpose :
* Creation Date : 02-26-2014
* Last Modified : Wed 26 Feb 2014 01:30:21 AM UTC
autocmd FileType go autocmd BufWritePre <buffer> Fmt
#!/bin/sh
file=$1
auth=$2
ext=${file#*.}
if [ -f ~/.vim/headers/${ext}.hd ]; then
cat ~/.vim/headers/${ext}.hd
exit 0
fi