- Shrink to Grow(Daniel Bovensiepen)
- Identical Production, Staging and Development Environments Using Chef, AWS and Vagrant(Christopher Rigor)
- Fewer Constraints, More Concurrency.(Ryan Smith)
- Webruby: Now you can write your favorite Ruby code for the browser!(Xuejie "Rafael" Xiao)
- Contributing to Ruby(Zachary Scott)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
class GitHubClient: | |
def __init__(self, apikey, session=None): | |
self.headers = {"Authorization": f"Bearer {apikey}"} | |
if not session: | |
self.sess = requests.Session() | |
else: | |
self.sess = session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function New-DotNetToast { | |
[cmdletBinding()] | |
Param( | |
[Parameter(Mandatory, Position = 0)] | |
[String] | |
$Title, | |
[Parameter(Mandatory,Position = 1)] | |
[String] | |
$Message, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Git hosting service | |
[Service] | |
User=gitbucket | |
ExecStart=/usr/bin/java -jar /home/gitbucket/gitbucket.war --port=xxxx --host=127.0.0.1 --gitbucket.home=/home/gitbucket/repo | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 私が考える安全なプログラムを書くために必要なこと | |
今も昔も「入力によって挙動が大幅に変わるAPI」が世の中には多数存在していて、プログラマが本来意図した挙動と異なる動作を引き起こしている。 | |
- ファイルを開こうとしたらコマンドを実行できてしまったり | |
- CSSセレクタを書いてるつもりがHTMLタグを生成してしまったり | |
- SELECT文を発行するつもりがDELETE文を発行できてしまったり | |
こういったときに | |
- 入力値検証をしないと危険になる |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beep_if_long_time_past() { | |
LAST_COMMAND_DURATION=$(($(date +%s) - ${LAST_COMMAND_TIME})) | |
LAST_COMMAND=${BASH_COMMAND} | |
[[ ${LAST_COMMAND_DURATION} -gt 10 ]] && { growlnotify -a Terminal -t "job finished" -m "${LAST_COMMAND_DURATION} seconds for ${LAST_COMMAND}!"; } | |
export LAST_COMMAND_TIME= | |
} | |
export PROMPT_COMMAND=beep_if_long_time_past | |
trap '[ -z ${LAST_COMMAND_TIME} ] && export LAST_COMMAND_TIME=$(date +%s)' DEBUG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
メモ | |
全体的なこと | |
- 想定してるRubyとかRailsのバージョンが古いので何とかしたい。 | |
- 個人的に改造してる人がそれなりにいるので、その辺まとめたい。 | |
- github/livedoor もあるんだけど、そこにadmin権限持ってるユーザー好き勝手追加は怖いので別で + コミュニティ主導でやりたい | |
- html/js/css も割と古くなってしまっているので、そのへんも何とかしたい。 | |
---- | |
オープンソースに拘るのは保険的な意味合いもあるのだけど、 | |
サービス型のRSSリーダーで出来無いことがそれなりにあるというのが大きい。 |
https://gist.github.com/mala/5062931
の続き。
Twitterの人に色々と問題点は伝えたんだけど、これからOAuthのサーバー書く人や、クライアント書く人が似たような問題を起こさないようにするために、どうすればいいのかについて簡単に書きます。既存の実装真似して作るとうっかりひどい目にあう。
自分は意図的に「Twitterの脆弱性」という表現を使わないように気を使っていて、それはクライアントアプリ側の責任もあるからなのだけれども、安全に実装するための方法がわかりにくかったり誤解を招きやすかったり、Twitterに買収されているTweetDeckにも問題があったりしたので、それはやっぱりTwitter側の責任の比重が大きいとは思う。とはいっても別に責任を追求したかったり◯◯はクソだといったことを言いたいわけではなく、誰が悪いとか言う以前に、複合的な要因によって問題が起きるときには原因を正しく理解する必要があると思う。
- サーバー側で秘密の鍵を持っている(それが無いとアクセストークンを取得できない or 使えない)
NewerOlder