Skip to content

Instantly share code, notes, and snippets.

View saki7's full-sized avatar

Nana Sakisaka saki7

  • Tokyo, Japan
View GitHub Profile
@kennyj
kennyj / rails_3_1_RC4_changes.md
Created May 6, 2011 17:34 — forked from ryanb/rails_3_1_rc4_changes.md
Rails 3.1 RC4の変更点(和訳)

Railties 3.1 RC4

  • 新しいrakeタスク assets:clean はプリコンパイルされたアセットを削除する。

  • --skip-gemfile--skip-bundleなしでの、アプリケーションとプラグインのソース生成は、bundle installを走らせる

  • jdbc*アダプターにとってのデータベースタスクを修正した

  • jdbcpostgresqlにとってのテンプレート生成

unicornのシグナルまとめ

Masterに送るシグナル

HUP

unicornに食わせた設定ファイルの preload_app が false なら、application codeのあらゆる変化を読み込んだ上でworkerをリスタートする。preload_appがtrueならばapplication codeが変化しててもそれを反映しない。その場合USR2 + QUIT使わないとだめ

reloadするときに Gem.refresh が呼ばれるので、Gemfileに新しいライブラリ書いてあればそれ読み込むよ

@suma
suma / msgpackrpc.md
Last active May 9, 2016 22:59
MessagePack RPCクライアントの振る舞い及びエラー処理

MessagePack RPCクライアントの振る舞い及びエラー処理

概要

MessagePack-RPCのクライアントのエラー処理を正しく、またその後に何をすべきか(可能か)まとめる。 「このエラー起きたとき、どう処理すべきか?」ということを説明する。

説明しないこと:RPCサーバの作り方、各言語のライブラリのプロトコル実装やエラー定義の差。

@minamorl
minamorl / autofollow.py
Last active July 27, 2016 04:53
gistに直接気持ちで書いたので動くか知らない
import staccato
import time
# must be replaced
consumer_key = "YOURS"
consumer_secret = "YOURS"
access_token_key = "YOURS"
access_token_secret = "YOURS"
TARGET = "username"
SLEEP_TIME = 5
@orzccc
orzccc / devise.ja.yml
Created July 13, 2012 10:04 — forked from yhara/devise.ja.yml
Japanese locale file for "Devise" (2.1.2) http://github.com/plataformatec/devise/wiki/I18n
ja:
errors:
messages:
expired: "の期限が切れましたので、新しくリクエストしてください"
# expired: "has expired, please request a new one"
not_found: "は見つかりませんでした"
# not_found: "not found"
already_confirmed: "は既に登録済みですのでログインしてください"
# already_confirmed: "was already confirmed, please try signing in"
not_locked: "は凍結されていません"
@boformer
boformer / RandomTreeRotationMod.cs
Last active May 15, 2018 02:19
Random Tree Rotation Mod for Cities: Skylines (Concerts/Natural Disasters)
using ICities;
namespace RandomTreeRotation
{
public class RandomTreeRotationMod : LoadingExtensionBase, IUserMod
{
public string Name
{
get { return "Random Tree Rotation"; }
}
public string Description
@ksasao
ksasao / acc.py
Last active September 12, 2018 14:08
iPhoneで心拍を取るテスト。Pythonista 用。実行すると5秒後から5秒間測定を行います。仰向けになってiPhoneを胸の上に置き、息を止めてじっとしていてください。
'''This script records your device's orientation (accelerometer data) for 5 seconds, and then renders a simple plot of the gravity vector, using matplotlib.'''
import motion
import matplotlib.pyplot as plt
from time import sleep
import console
def main():
javascript:(function(){let url=location.href;let title=document.title;url=encodeURIComponent(url);title=encodeURIComponent(title);window.open('https://twitter.com/intent/tweet?url='+url+'&text='+title,'_blank');})();
@hecomi
hecomi / RtlGetVersion.cpp
Last active October 14, 2021 17:08
Windows の OS のバージョン取得するヤツ
#include <iostream>
#include <Windows.h>
void OutputWindowsInformation()
{
const auto hModule = ::LoadLibrary(TEXT("ntdll.dll"));
if (!hModule) return;
if (const auto address = ::GetProcAddress(hModule, "RtlGetVersion"))
{
@polamjag
polamjag / amazon-calc.js
Last active September 7, 2022 11:23 — forked from arcatdmz/amazon-csv.js
Amazon で使った金額の合計を出す奴 (2014-2016 年バージョン)
// Amazon で使った金額の合計を出す奴
//
// 使い方:
// 1. 全部コピーする (右上の Raw をクリックした先でやるのが楽)
// 2. Amazon の注文履歴ページ ( https://www.amazon.co.jp/gp/css/order-history/ ) を開く
// 3. F12 または 右クリ→要素の検証 とかで出てくる開発者ツールのコンソール (JavaScript REPL) にペースト
// 4. エンターで実行
// (Firefox はなんか allow pasting とタイプしろみたいなことを言われるので従う)
// 5. しばらく待つと alert で合計金額を表示
//