Bitbucket登録後にSSHの公開鍵を設定する時のメモ
$ cd ~/.ssh
$ mkdir bitbucket
proc is_computable_double {val} { | |
expr {[string is double -strict $val] && ![is_nan $val]} | |
} | |
proc is_nan {val} { | |
string match -nocase [string trimleft $val +-] "nan" | |
} | |
proc is_infinite {val} { | |
expr {$val == Inf || $val == -Inf} |
from twisted.internet import reactor, protocol, endpoints | |
from twisted.protocols import basic | |
from twisted.internet.defer import Deferred, inlineCallbacks, returnValue | |
from twisted.internet import task | |
from twisted.python import log | |
# log errors inside reactor to stdout | |
from twisted.python.log import startLogging | |
from sys import stdout | |
startLogging(stdout) |
using System; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.IO; | |
namespace TestGetPrivateProfileSectionNames | |
{ | |
public class Program | |
{ | |
[DllImport("kernel32.dll")] |
# 1. Install Chocolatey | |
<# | |
Set-ExecutionPolicy RemoteSigned -Force | |
# Create empty profile (so profile-integration scripts have something to append to) | |
if (-not (Test-Path $PROFILE)) { | |
$directory = [IO.Path]::GetDirectoryName($PROFILE) | |
if (-not (Test-Path $directory)) { | |
New-Item -ItemType Directory $directory | Out-Null | |
} |
やわらかRubyはCC BY 4.0 で提供します。 | |
詳細: https://creativecommons.org/licenses/by/4.0/deed.ja | |
This work is licensed under a Creative Commons Attribution 4.0 International License. | |
See also: https://creativecommons.org/licenses/by/4.0/deed |
# Install mingw with msys and all options from http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/ | |
# Install python 2.7 to C:\Python27 and add to Path environmental variable | |
cd ~/src | |
cd openssl | |
./Configure mingw shared --prefix=/usr/local | |
make depend | |
make | |
make install |
https://gist.github.com/mala/5062931
の続き。
Twitterの人に色々と問題点は伝えたんだけど、これからOAuthのサーバー書く人や、クライアント書く人が似たような問題を起こさないようにするために、どうすればいいのかについて簡単に書きます。既存の実装真似して作るとうっかりひどい目にあう。
自分は意図的に「Twitterの脆弱性」という表現を使わないように気を使っていて、それはクライアントアプリ側の責任もあるからなのだけれども、安全に実装するための方法がわかりにくかったり誤解を招きやすかったり、Twitterに買収されているTweetDeckにも問題があったりしたので、それはやっぱりTwitter側の責任の比重が大きいとは思う。とはいっても別に責任を追求したかったり◯◯はクソだといったことを言いたいわけではなく、誰が悪いとか言う以前に、複合的な要因によって問題が起きるときには原因を正しく理解する必要があると思う。
説明するのめんどい http://vividcode.hatenablog.com/entry/twitter-oauth-vulnerability
とりあえず即座に攻撃できるような状態ではなくなっています。