Skip to content

Instantly share code, notes, and snippets.

View matsumos's full-sized avatar

Keiichiro Matsumoto matsumos

View GitHub Profile
@yomotsu
yomotsu / gist:7e2ec401c1520d880308
Last active February 24, 2022 14:16
BEMが失敗しているパターンとその問題点

思いついたら足していく

名前にとらわれすぎ

BAD1

「コンポーネントのエレメントのエレメントのエレメントの...」として定義している

  <div class="v1-news">
@udzura
udzura / tutorial.md
Created June 2, 2014 03:31
Hubot + CoffeeScript ではじめるやわらかプログラミング入門

やわらかプログラミング入門

  • Hubot であそぼう


始めに、地図を描く

@philfreo
philfreo / gist:7257723
Created October 31, 2013 21:44
Facebook Perl source code from 2005. When browsing around thefacebook.com in 2005 the server spit out some server-side source code rather than running it. I believe this was for their old graph feature that let you visualize the graph between all your friends. The filename is `mygraph.svgz` and contains some gems such as a commented out "zuck" d…
#!/usr/bin/perl
use Mysql;
use strict;
use vars qw($school_name);
use vars qw($pass);
require "./cgi-lib.pl";
@voluntas
voluntas / django-s3-imagekit-celery.rst
Last active May 13, 2022 13:46
S3 と非同期サムネイル作成 コトハジメ

S3 と非同期サムネイル作成 コトハジメ

更新:2013-12-08
バージョン:0.1.8
作者:@voluntas
URL:http://voluntas.github.io/

概要

@soundkitchen
soundkitchen / policy_server.py
Created April 3, 2013 01:21
simple receive policy file server using eventlet.
# vim: fileencoding=utf-8 :
import logging
import eventlet
logging.basicConfig(level=logging.DEBUG,
format='[%(asctime)s %(levelname)s] %(message)s',
datefmt='%Y/%m/%d %H:%M:%S')
@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
@andkerosine
andkerosine / raskell.rb
Created August 15, 2012 05:56
Haskell-like list comprehensions in Ruby
$stack, $draws = [], {}
def method_missing *args
return if args[0][/^to_/]
$stack << args.map { |a| a or $stack.pop }
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :<
end
class Array
def +@
@santisaez
santisaez / gist:3187798
Created July 27, 2012 12:57
State of the Art: STUN + TURN servers on Linux (July 2012)

STUN implementations

  • stund
  • Content: server daemon and test client for STUN, RFC-3489 only
  • URL does not load, the project seems abandoned
  • The code is also available on SourceForge, last update was on January 2012
  • TCP and TLS modes not supported
  • The server needs two IPs, it’s mandatory and can not be configured
  • C++, no extra libraries required, Windows port available
  • Version = 0.97 (0.96 package available on Debian, 5 years without updates)
@soundkitchen
soundkitchen / create_application.py
Created May 23, 2012 10:08
werkzeug な redis 使った SessionStore とかとか
# vim: fileencoding=utf-8 :
from werkzeug.contrib.sessions import SessionMiddleware
from sessions import RedisSessionStore
def create_application():
app = Application()
app = SessionMiddleware(app, RedisSessionStore())