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
| example=# CREATE TABLE tstest (ts1 timestamp, ts2 timestamp with time zone); | |
| CREATE TABLE | |
| example=# \d tstest; | |
| Table "public.tstest" | |
| Column | Type | Modifiers | |
| --------+-----------------------------+----------- | |
| ts1 | timestamp without time zone | | |
| ts2 | timestamp with time zone | | |
| example=# INSERT INTO tstest VALUES (current_timestamp, current_timestamp); |
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
| package com.github.tototoshi.gifplayer | |
| import scala.scalajs.js | |
| import js.annotation.JSExport | |
| import org.scalajs.dom | |
| @JSExport | |
| object GIFPlayer extends js.JSApp { | |
| def main(): Unit = { |
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
| <?php | |
| class GIFReader | |
| { | |
| const TRAILER = 0x3b; | |
| const IMAGE_INTRODUCER = 0x2c; | |
| const EXTENSION_INTRODUCER = 0x21; | |
| const GRAPHIC_CONTROL_LABEL = 0xf9; |
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 subprocess | |
| script = 'display notification "Finished" with title "Job Finished" sound name "Tritone"' | |
| p = subprocess.Popen(["osascript"], stdin=subprocess.PIPE) | |
| p.stdin.write(script) | |
| p.stdin.close() | |
| p.wait() |
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
| <?php | |
| /* !! 入力配列の中にある数値添字要素の添字の数値は、 結果の配列ではゼロから始まる連続した数値に置き換えられます。 */ | |
| $a = array( | |
| 'a' => 'aaa', | |
| '100' => '100100100', | |
| ); | |
| $b = array( | |
| 'b' => 'bbb', |
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
| libraryDependencies ++= Seq( | |
| jdbc, | |
| cache, | |
| "org.scalikejdbc" %% "scalikejdbc" % "[1.7,)", // by scalikejdbc organization (@seratch, .....) | |
| "org.scalikejdbc" %% "scalikejdbc-interpolation" % "[1.7,)", // by scalikejdbc organization | |
| "org.scalikejdbc" %% "scalikejdbc-play-plugin" % "[1.7,)", // by scalikejdbc organization | |
| "com.github.tototoshi" %% "play-flyway" % "1.0.1", // by me | |
| "com.github.mumoshu" %% "play2-memcached" % "0.3.0.2", // by @mumoshu | |
| "com.github.nscala-time" %% "nscala-time" % "0.6.0", // by nscala-time organization (@kmizu, @xuwei_k ...) | |
| "jp.t2v" %% "play2-auth" % "0.11.0", // by @gakuzzzz |
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.concurrent.Future | |
| import scala.concurrent.ExecutionContext.Implicits.global | |
| object TaskLancher extends skinny.task.TaskLauncher { | |
| register("h2-browser", (params) => { | |
| val f = Future { | |
| org.h2.tools.Server.main() | |
| } | |
| f.onFailure { case e => e.printStackTrace() } |
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
| #!/usr/bin/env alpaca | |
| visit("http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html") | |
| click("input[type=radio]") | |
| click(partialLink("macosx-x64.dmg")) |
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
| /* 1.0.0 */ | |
| import scala.slick.driver.PostgresDriver.simple._ | |
| case class Task(id: Int, name: String) | |
| object Task extends Table[Task]("task") { | |
| def id = column[Int]("id") | |
| def name = column[String]("name") | |
| def * = id ~ name <> (Task.apply _, Task.unapply _) | |
| } |
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 sbt.Keys._ | |
| object ScalaoauthasyncBuild extends Build { | |
| lazy val scalaoauthasync = Project( | |
| id = "scala-oauth-async", | |
| base = file("."), | |
| settings = Project.defaultSettings ++ Seq( | |
| name := "scala-oauth-async", |