Skip to content

Instantly share code, notes, and snippets.

View hnakamur's full-sized avatar

Hiroaki Nakamura hnakamur

View GitHub Profile
@imaya
imaya / nucon.md
Created February 13, 2014 01:10
nucon で cacoo について聞いてきたのでメモとそれについての感想

はじめに

趣味でお絵描きツールをつくっていることもあって、ブラウザで動くドローイングツールの cacoo には興味があったので nucon で cacoo について聞いてきました。 結構実装についても話していたので大変参考になりました。 個人的な感想としては「あーやっぱりそうなるよねー」という感じだったのですが、すぐに忘れてしまいそうなのでここに残しておきます。 メモを元に書いているので、脳内補完が働いている部分が多分にあると思いますので、そこは注意して読んでください。

操作まわりの実装、 Undo/Redo 機能、共同編集機能

操作に関しては State パターンを使って実装している。

@tkuchiki
tkuchiki / get_current_shell.sh
Last active August 29, 2015 14:01
現在の Shell を Shellscript の中から判定する(Linux, BSD 両対応)
_PID=$$; _PPID=$(ps -o ppid -p $_PID | tail -n 1); ps -p $_PPID
@shirou
shirou / output_csv.py
Last active August 29, 2015 14:02
ansible callback example 1. create directory "callback_plugin" 2. place one of this file. that's all
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import datetime
format = "%Y-%m-%d %H:%M:%S"
class CallbackModule(object):
def __init__(self):
@mattn
mattn / moguro.go
Last active August 29, 2015 14:03
./moguro | peco
package main
import (
"fmt"
"strings"
"time"
)
func main() {
time.Sleep(3 * time.Second)
@mopemope
mopemope / example_pongo2.go
Created July 16, 2014 06:45
Gin meets Pongo2 !
package main
import (
"github.com/flosch/pongo2"
"github.com/gin-gonic/gin"
"net/http"
)
type pongoRender struct {
cache map[string]*pongo2.Template
@voluntas
voluntas / mqtt_meetup_tokyo_201408_copy.rst
Created September 5, 2014 10:21
(COPY) MQTT Meetup Tokyo 2014.08

(COPY) MQTT Meetup Tokyo 2014.08

概要

内容

@yuroyoro
yuroyoro / chat-osx.css
Created September 5, 2014 07:07
HipCahtのcssをアレした( ꒪⌓꒪)
/* /Applications/HipChat.app/Contents/Resources/chat-osx.css */
p, div {
font-family: Helvetica;
}
p, div, .nameBlock p, .messageBlock p, .messageBlock div, .messageBlock pre {
/* These are %-based to enable text size scaling options. The default text size is defined
by a function on the WebPreferences object */
font-size: 100%;
@bajtos
bajtos / notice.md
Last active August 29, 2015 14:06
LoopBack workshop
@pochi
pochi / License.md
Last active August 29, 2015 14:06
Stuff goes bad
@tcnksm
tcnksm / Dockerfile
Last active August 29, 2015 14:08
Dockerfile for nghttp2
FROM buildpack-deps
RUN git clone https://github.com/tatsuhiro-t/nghttp2 \
&& cd nghttp2 \
&& autoreconf -i \
&& automake \
&& autoconf \
&& ./configure \
&& make