Skip to content

Instantly share code, notes, and snippets.

View yomusu's full-sized avatar

Yom Matsu yomusu

  • Japan
View GitHub Profile
@yomusu
yomusu / webserver.go
Created January 8, 2015 09:09
Simple Web Server with Go
package main
import (
"bufio"
"io"
"log"
"net/http"
"os"
)
@yomusu
yomusu / sortmap.go
Created October 31, 2014 08:50
Go sort map
package main
import (
"fmt"
"sort"
)
type Shop struct {
Code string
}
@yomusu
yomusu / csvblob.go
Created October 31, 2014 08:01
Go appengine : csv upload(blob) & parse
package stuxy
import (
"html/template"
"io"
"net/http"
"encoding/csv"
"strings"
@yomusu
yomusu / gopush.go
Last active August 29, 2015 14:08
Push配信サーバー with Go
package main
import (
"fmt"
"log"
"net/http"
"sync"
"time"
)
@yomusu
yomusu / main.go
Created October 28, 2014 06:57
Go:CloseNotify, Timeout example
package main
import (
"fmt"
"log"
"net/http"
"time"
)
func outln(w http.ResponseWriter, mes string) {
@yomusu
yomusu / main.go
Created October 24, 2014 05:25
go : Chunked Transfer HTTP Server
package main
import (
"fmt"
"net/http"
"time"
)
func handler(w http.ResponseWriter, r *http.Request) {
@yomusu
yomusu / mselect.dart
Last active August 29, 2015 14:07
Useful Select Element
import 'package:polymer/polymer.dart';
import 'dart:html';
@CustomTag('m-select')
class MSelect extends PolymerElement {
/// value property
@published Object value = "";
@yomusu
yomusu / join.java
Created June 19, 2014 06:58
join iterable
public class Hoge {
/***
*
* sepaで連結して文字列を作成します
*
* @param sepa
* @return
*/
static public String join( Iterable iterable, String sepa ) {
/****************************************************************
*
*
* this is scanner, light and simple, like one of Java1.5.
*
*
* [example]
*
* LiteScanner s = new LiteScanner( "one,two", ',' );
* while( s.hasNext() )
@yomusu
yomusu / ImageSample
Created December 26, 2012 09:20
This code is handling pixels on a array with only BufferedImage.
package jp.yom;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public class ImageSample {