Skip to content

Instantly share code, notes, and snippets.

View naari3's full-sized avatar
🏁

naari3

🏁
View GitHub Profile
@mohayonao
mohayonao / MarioMML.py
Created January 22, 2011 00:14
Python+PyAudio+MMLでマリオのBGM再生 http://www.youtube.com/watch?v=rQtyiy-OOtA
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import sys
import math
import array
import random
import itertools
import collections
@ayang
ayang / app.py
Created February 4, 2012 03:47
Tornado session manager use redis
class Application(tornado.web.Application):
def __init__(self):
tornado.web.Application.__init__(self, handlers, **settings)
self.db_session = db_session
self.redis = redis.StrictRedis()
self.session_store = RedisSessionStore(self.redis)
class BaseHandler(tornado.web.RequestHandler):
@chetan
chetan / yardoc_cheatsheet.md
Last active May 4, 2024 11:12
YARD cheatsheet
@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

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

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@firedev
firedev / localized.rb
Last active March 27, 2020 04:53
Easy localization for Rails model attributes. Models should have attributes ending with `_<locale>`, i.e. `title_en`, `title_ru`. `attr_translated :title` will add a `.title` method. If `.title_<current_locale>` is empty, `.title_en` will be returned.
# localized.rb
#
# Usage:
#
# include Localized
# attr_translated :title
#
# Model.title now returns title_<locale> or falls back to title_en
#
@rummelonp
rummelonp / zsh_completion.md
Last active February 22, 2023 15:06
zsh の補完関数の自作導入編

zsh の補完関数の自作導入編

あまり深く理解してないので識者のツッコミ大歓迎

補完を有効にする

取り敢えず最低限だけ

# 補完を有効にする
@wsantos
wsantos / gist:5796726
Created June 17, 2013 13:07
Twitter Tornado sample
class AuthTwitterLoginHandler(LoginHandler, tornado.auth.TwitterMixin):
@tornado.web.asynchronous
@gen.engine
def get(self):
my_url = (self.request.protocol + "://" + self.request.host +
"/auth/twitter?next=" +
tornado.escape.url_escape(self.get_argument("next", "/")))
if self.get_argument("oauth_token", None):
user = yield gen.Task(self.get_authenticated_user)
@saboyutaka
saboyutaka / turbolinks_note.md
Last active October 5, 2022 08:45
Turbolinksを調べてみた