This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URL url = new URL("https://api.dropbox.com/1/oauth/request_token"); | |
HttpURLConnection connection = (HttpURLConnection)url.openConnection(); | |
connection.setDoInput(true); | |
connection.addRequestProperty("Authorization", buildOAuthHeader(false)); | |
connection.setRequestMethod("GET"); | |
InputStream inStream = connection.getInputStream(); | |
BufferedReader input = new BufferedReader(new InputStreamReader(inStream)); | |
String line = input.readLine(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mapleader = '\\' | |
" Vundle | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/vundle | |
call vundle#rc() | |
" Vundle本体 | |
Bundle 'sgur/vundle' | |
"Vundleの設定 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filetype off | |
filetype plugin indent off | |
" Golang Vim | |
set runtimepath+=$GOROOT/misc/vim | |
" Golang gocode | |
exe "set runtimepath+=".globpath($GOPATH, "src/github.com/nsf/gocode/vim") | |
" NeoBundle | |
if has('vim_starting') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"image" | |
"image/draw" | |
_ "image/jpeg" | |
_ "image/png" | |
"github.com/google/gxui" | |
"github.com/google/gxui/drivers/gl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"regexp" | |
"strconv" | |
"strings" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/cipher" | |
"crypto/aes" | |
"fmt" | |
) | |
var block cipher.Block |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 暗号的に弱いsalt方式なので、サンプルは一生でないと思いなんとなく作成しておいた | |
// | |
// echo "test" | openssl enc -e -aes-256-cbc | |
// | |
// と同じかな? | |
// p=パスフレーズ,d=暗号化するデータ | |
// | |
func encrypt(p, d string) (string, error) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"net" | |
"time" | |
"golang.org/x/text/encoding/japanese" | |
"golang.org/x/text/transform" |