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
| require 'socket' | |
| require 'net/http' | |
| require 'uri' | |
| class Proxy | |
| PORT = 8888 | |
| def initialize | |
| @server_socket = TCPServer.open(nil, PORT) | |
| end |
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
| require 'socket' | |
| require 'net/http' | |
| require 'uri' | |
| class Proxy | |
| PORT = 8888 | |
| def initialize | |
| @server_socket = TCPServer.open(nil, PORT) | |
| @responses = {} |
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
| require 'sinatra' | |
| require 'net/https' | |
| require 'uri' | |
| require 'date' | |
| =begin | |
| ガルーンから今月&来月分のiCalデータを取ってきてくれるプロキシです。 | |
| sinatraが必要なので、入れてなければgem install sinatraしてね。 | |
| 使い方はこのプログラムを起動してから、iCalでカレンダーメニューの照会を開き、"http://localhost:10999/ical"を指定すればいけるはず。 | |
| =end |
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 org.specs2.mutable._ | |
| import org.specs2.mock._ | |
| trait Dummy extends Any | |
| case class V(s: String) extends AnyVal with Dummy | |
| class A { | |
| def f: Dummy = new V("Hello") | |
| } |
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
| require 'webrick' | |
| include WEBrick | |
| s = HTTPServer.new(:Port => 10080) | |
| s.mount_proc('/') do |req, res| res.body = 'hogehoge' end | |
| s.start |
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
| #!/bin/sh | |
| convert Icon.png -resize 29x -strip +set date:create +set date:modify Icon-29.png | |
| convert Icon.png -resize 58x -strip +set date:create +set date:modify Icon-29@2x.png | |
| convert Icon.png -resize 80x -strip +set date:create +set date:modify Icon-40@2x.png | |
| convert Icon.png -resize 57x -strip +set date:create +set date:modify Icon-57.png | |
| convert Icon.png -resize 114x -strip +set date:create +set date:modify Icon-57@2x.png | |
| convert Icon.png -resize 120x -strip +set date:create +set date:modify Icon-60@2x.png | |
| convert Icon.png -resize 29x -strip +set date:create +set date:modify Icon-29.png | |
| convert Icon.png -resize 58x -strip +set date:create +set date:modify Icon-29@2x.png | |
| convert Icon.png -resize 40x -strip +set date:create +set date:modify Icon-40.png |
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
| curl -I http://search.yahoo.co.jp/ | |
| HTTP/1.1 500 Internal Server Error | |
| Server: nginx | |
| Date: Mon, 13 Oct 2014 11:50:27 GMT | |
| Content-Type: text/html | |
| Content-Length: 186 | |
| Connection: close |
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
| # WARNING: This script has an enormous vulnerability!!!!!! | |
| require 'sinatra' | |
| get '/' do | |
| erb <<"HTML" | |
| <form action="upload" method="POST" enctype="multipart/form-data"> | |
| <input type="file" name="file" /> | |
| <input type="submit" value="Upload" /> | |
| </form> |
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
| # http://www.scala-sbt.org/release/docs/Proxy-Repositories.html | |
| # http://www.scala-sbt.org/release/docs/Launcher-Configuration.html | |
| # https://storage-download.googleapis.com/maven-central/index.html | |
| [repositories] | |
| local | |
| typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly | |
| google-maven-central: https://maven-central-asia.storage-download.googleapis.com/repos/central/data/ | |
| maven-central | |
| sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots |
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
| # http://www.scala-sbt.org/1.x/docs/Launcher-Configuration.html | |
| # https://storage-download.googleapis.com/maven-central/index.html | |
| [repositories] | |
| local | |
| maven-central: https://maven-central-asia.storage-download.googleapis.com/repos/central/data/ | |
| lightbend-ivy-releases: https://dl.bintray.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly | |
| #typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly | |
| sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots |