Skip to content

Instantly share code, notes, and snippets.

View nonylene's full-sized avatar
📶
On vacation

nonylene nonylene

📶
On vacation
View GitHub Profile
@kaz
kaz / isucon10.md
Last active September 14, 2020 14:38

再起動試験で落ちていた件の調査 - NaruseJun

理由

apparmorのポリシー(mysql-serverパッケージに入ってる/etc/apparmor.d/usr.sbin.mysqld)が生きていて、systemdがmariadbの起動を検知できておらず、systemctl stop相当の処理がかかったため。

疑問1: mariadbに入れ替えたときにto-hutohuがaa-remove-unknownでポリシーを消したのでは?

これはそもそも恒久対応ではなかった。

@simonw
simonw / recover_source_code.md
Last active June 21, 2024 00:11
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
#! /bin/sh
git grep -q binding.pry
if [ $? -eq 0 ]; then
echo "binding.pry aru yo!" >&2
exit 1
fi
echo "127.0.0.1\ttwitter.com
127.0.0.1\twww.facebook.com
127.0.0.1\tslack.com
127.0.0.1\tanond.hatelabo.jp" >> /etc/hosts
@jgilfelt
jgilfelt / CurlLoggingInterceptor.java
Created January 9, 2016 15:34
An OkHttp interceptor that logs requests as curl shell commands
/*
* Copyright (C) 2016 Jeff Gilfelt.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software

インスタグラムAPIが仕様変更し、アプリケーション・サービスへの利用には申請と承認が必要に

2015年11月17日からインスタグラムの提供しているAPIの仕様が大幅に変更されました。

仕様変更する前までは、インスタグラムのアカウント所有者であれば誰でも、開発者登録をするだけでAPI機能の全てを使用することができましたが、今回の変更で、APIの正式利用にはインスタグラムにレビューの申請をして承認されることが必須となりました。
また、17日以前に作成したアプリケーション・サービスについても、2016年6月1日までに申請し承認されなければ、自動的にテスト(サンドボックス)モードに切り替わるようです。

インスタグラムAPI利用規約の日本語訳

英語でしか表記のなかった規約の一部を日本語に翻訳したので、まとめておきます。

@hashrock
hashrock / diag.md
Last active February 26, 2024 05:51
作図系ツール・ライブラリまとめ

シーケンス図とかフローチャートをしごとで描画することになった場合、 テキストから生成できたら楽なので、それ系のツールまとめ

GraphViz

http://www.graphviz.org/

  • C製
  • Doxygen, Moinmoinなどと連携可能
  • ブロック図、クラス図、ネットワーク図など
@1995hnagamin
1995hnagamin / syugoga_ookiidesuyo.rb
Last active August 29, 2015 14:20 — forked from anonymous/naniittenda_koitu.rb
主語が大きいですよ
Plugin.create :syugoga_ookiidesuyo do
command(:syugoga_ookiidesuyo,
name: '主語が大きいですよ',
condition: lambda{ |opt| opt.messages.size == 1 },
visible: true,
role: :timeline) do |opt|
Service.primary.post message: "主語が大きいですよ #{opt.messages.first.parma_link}"
end
end