Skip to content

Instantly share code, notes, and snippets.

View shionryuu's full-sized avatar
😪
I may be slow to respond.

shionryuu

😪
I may be slow to respond.
View GitHub Profile
@shionryuu
shionryuu / gvm_usage.md
Last active August 29, 2015 14:07
golang gvm版本控制
# Makefile for a go project
#
# Author: Jon Eisen
# site: joneisen.me
#
# Targets:
# all: Builds the code
# build: Builds the code
# fmt: Formats the source files
# clean: cleans the code
@shionryuu
shionryuu / fibonacci.go
Created October 23, 2014 06:44
golang fibonacci generator
package main
import (
"fmt"
)
/*
* fibonacci generator
*/
func fibonacci() func() int64 {
@shionryuu
shionryuu / gorm模型定义.md
Created October 27, 2014 11:07
gorm模型定义

gorm模型定义

示例

type User struct {
    Id           int64
    Birthday     time.Time
    Age          int64
    Name         string  `sql:"size:255"`
@shionryuu
shionryuu / delete_svn_missing.md
Last active August 29, 2015 14:08
use powershell to delete svn missing files

PowerShell 获取并删除svn丢失的文件

# recommended
function svn_missing
{
    svn status | where { $_ -match '\!\s*(?<x>\S*)' } | foreach { $matches.x }
    # or
    # svn status | where { $_ -match '\!\s*(?<x>\S*)' } | foreach { $matches['x'] }
 # or
@shionryuu
shionryuu / main.go
Created April 22, 2015 11:23
ants-go 测试
package main
import (
"encoding/json"
"fmt"
"github.com/wcong/ants-go/ants/action/http"
"io"
"io/ioutil"
Http "net/http"
"net/url"
@shionryuu
shionryuu / v2ex_188427.md
Created May 7, 2015 02:30
单身程序员福利,大量妹纸想要领养你 解答
H4sIAAAAAAAAAzPUUwjJSFVIzCsuTy1SKMlXyMlMS9VRKAGKleZllqUWFQN5iXkpCqlAdmVJRmZe
uh4vFy+XkZ5Chaubk5tOhZOLK4h0c3J5v2f2sxnrn+xoeLls2pPdDU92drxYP/1xQxNIvbGegltm
UXGJQpCbs0JeaW4S0Lb8NIWC/KISBWdzIwtHE0tjM2NnS0dLY0cTY0dzV3M3I2MjJ1NHUxNHkH4r
N08/Rx9eLkeoQ4HuKyxNLS7JzM8r1lFwzs8rSUwuUfDMK8ssSU21UkhNzgB6Jb8sVTc5PwWovkYh
xNMvMjTIBwDO8n7C8AAAAA==
@shionryuu
shionryuu / install_rofi.sh
Created May 15, 2015 11:23
install rofi
#!/bin/sh
apt-get update
apt-get upgrade -y --show-upgraded
apt-get install -y sudo apt-get install libxft-dev libxinerama-dev libpango1.0-dev
wget -c https://github.com/DaveDavenport/rofi/releases/download/0.15.4/rofi-0.15.4.tar.gz
tar -xzvf rofi-0.15.4.tar.gz
cd rofi-0.15.4
@shionryuu
shionryuu / python_challenge_01.py
Created June 11, 2015 12:18
Python Challenge 01
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# http://www.pythonchallenge.com/pc/def/map.html
import string
text = '''
g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj.
'''
@shionryuu
shionryuu / python_challenge_02.py
Created June 11, 2015 12:19
Python Challenge 02
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# http://www.pythonchallenge.com/pc/def/ocr.html
import re
# the content of rare_characters.txt is from the
# source of ocr.html
with open('rare_characters.txt', 'r') as file1: