- その面白そうな話、私も参加していいよね?なぜなら私は無条件に受け入れられているからおじさん(闖入おじさん) #おじさんパターン
- 後出し難癖おじさん #おじさんパターン
- 困難は成長のチャンス!だから君たちに成長の機会をあげようおじさん (成長おじさん) #おじさんパターン
- あらゆる事案に一般論コメントおじさん #おじさんパターン
- 俺ってあらゆることに精通してるじゃん?だから力になるよおじさん (精通おじさん) #おじさんパターン
This file contains hidden or 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
To get started with Docker/Marathon/Mesos, you need to install a | |
new Mesos, a new Marathon, and Deimos, the bridge to Docker. | |
You'll also need Docker and the JVM. These instructions are for | |
Ubuntu 13.10. | |
## Install Mesos prerequisites | |
:; sudo apt-get update | |
:; sudo apt-get install zookeeperd default-jre python-setuptools python-protobuf curl pip | |
## Install recent Mesos |
This file contains hidden or 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 java.security.AlgorithmParameters; | |
import java.security.Key; | |
import java.security.SecureRandom; | |
import javax.crypto.*; | |
import javax.crypto.spec.*; | |
import java.security.spec.*; | |
import org.apache.commons.codec.binary.Base64; |
This file contains hidden or 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
def linkTo(label: String, url: String, options: (Symbol, Any)*) = Html( | |
options.foldLeft(<a href={url}>{label}</a>) { | |
case (elem, (k, v)) => | |
elem % new xml.UnprefixedAttribute(k.name, v.toString, elem.attributes) | |
}.toString | |
) |
This file contains hidden or 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 hidden or 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
liberator.registerObserver( | |
'enter', | |
function () { | |
commands.get('sbm').options.push([['-t', '-twitter'], liberator.modules.commands.OPTION_NOARG]); | |
libly.$U.around( | |
commands.get('sbm'), | |
'action', | |
function (next, [args]) { | |
if (args['-t']) { |
This file contains hidden or 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 sbt._ | |
import Keys._ | |
object build extends Build{ | |
def github(org: String, name: String, hash: String): Project = Project( | |
name, file(name) | |
).settings( | |
baseSettings ++ seq( | |
sourceGenerators in Compile <+= (sourceManaged in Compile){ dir => task{ |
This file contains hidden or 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
// This is the official Selenium documention endorsed method of waiting for elements. | |
// This method is ineffective because it still suffers from | |
// the stale element exception. | |
public static void clickByLocator ( final By locator ) { | |
WebElement myDynamicElement = ( new WebDriverWait(driver, 10)) | |
.until( ExpectedConditions.presenceOfElementLocated( locator ) ); | |
myDynamicElement.click(); | |
} |
This file contains hidden or 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 scala.language.dynamics | |
import scala.util.DynamicVariable | |
sealed trait Node { | |
def toXml: String | |
} | |
case class ElementNode(name: String, attributes: Map[String, String], children: List[Node]) extends Node { | |
def toXml = { |