Skip to content

Instantly share code, notes, and snippets.

View bluele's full-sized avatar
coding

Jun Kimura bluele

coding
View GitHub Profile
@bluele
bluele / targz.go
Created September 28, 2015 05:18
Golang compress tar.gz example.
package main
import (
"archive/tar"
"compress/gzip"
"io/ioutil"
"log"
"os"
"path"
)
@andreas
andreas / envelope_encryption.go
Created February 3, 2015 19:25
Envelope Encryption with Amazon KMS and Go
package main
import (
"bytes"
"crypto/rand"
"encoding/gob"
"fmt"
"io/ioutil"
"os"
"time"
@steeve
steeve / _readme.md
Last active July 9, 2024 04:49
How to cross compile Go with CGO programs for a different OS/Arch

How to cross compile Go with CGO programs for a different OS/Arch

It is possible to compile Go programs for a different OS, even though go build says otherwise.

You'll need:

@bluele
bluele / google_image_search.py
Last active September 15, 2022 22:20
Python script for Google search by image
#-*- coding:utf-8 -*-
from BeautifulSoup import BeautifulSoup as b
from urllib import quote_plus as q, unquote_plus as unq, urlencode
from urllib2 import build_opener, urlopen, HTTPCookieProcessor
from cookielib import CookieJar
import urlparse
import re
__author__ = 'bluele'
@japboy
japboy / jade-ftw.md
Last active October 23, 2023 11:18
Jade について。

Jade FTW

こんにちは。今回は現実逃避を兼ねて Jade の素晴らしさをお伝えしたいと思います。

Jade とは何か

[Jade][0] は JST (JavaScript Templates) の一つであり、HTML を書くための[軽量マークアップ言語][1] である [Haml][2] に影響を受けた JavaScript テンプレートエンジンでもあります。

go 1.1 scheduler

where

src/pkg/runtime proc.c asm_*.s

design

@j5ik2o
j5ik2o / gist:5288729
Last active February 7, 2016 03:29
IntelliJ IDEA/Eclipse対応 sbt プロジェクトの作成手順

事前準備

Scala & SBT & gitter8

$ brew install scala sbt giter8

IDE

@bluele
bluele / hserve
Last active November 8, 2016 14:52
Startup script for simple http server.
#!/usr/bin/env python
#-*- coding:utf-8 -*-
__author__ = 'bluele'
__version__ = '0.10'
__license__ = 'MIT'
__doc__ = """
# simple running
$ hserve
@bluele
bluele / suffixarray.py
Created February 25, 2013 04:53
Suffix Array
#-*- coding:utf-8 -*-
__author__ = 'bluele'
import unittest
class SuffixArray(object):
def __init__(self, string):
self.string = string
@lepture
lepture / gevent-flask.py
Last active January 30, 2020 15:29
gevent with werkzeug reload and debug
def runserver(port=5000, profile_log=None):
"""Runs a development server."""
from gevent.wsgi import WSGIServer
from werkzeug.serving import run_with_reloader
from werkzeug.debug import DebuggedApplication
from werkzeug.contrib.profiler import ProfilerMiddleware
port = int(port)
if profile_log: