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
Java のコードを | |
pythonista に持ち込む:まぁ、Java も書けなくはないけどね | |
rubyist に持ち込む:ツマラン、どこかに細工してやろうか・・・ | |
perler に持ち込む:出てけゴルァァァァァァァァァァァ!! | |
Python のコードを | |
Java エンジニアに持ち込む:おぅ、Python のコードか | |
rubyist に持ち込む:スクリプト言語の僚友だ、バッチリ直してやるぜ | |
perler に持ち込む:けっ、優等生か |
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 javax.script.ScriptEngine; | |
import javax.script.ScriptEngineManager; | |
public class Scripting { | |
public static void main(String[] args) throws Exception{ | |
ScriptEngine engin = new ScriptEngineManager().getEngineByName("JavaScript"); | |
engin.eval("print(\"Hello JavaScript!!\");"); | |
} |
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
group :test, :development do | |
gem 'rspec-rails' | |
gem 'guard' | |
gem 'guard-rspec' | |
gem 'growl', :require => false # for Mac | |
gem 'libnotify', :require => false # for *nix | |
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
#!/usr/bin/ruby | |
# -*- coding: utf-8 -*- | |
require 'net/http' | |
def increment(word,pronounce) | |
http = Net::HTTP.new('yomikata.org') | |
response = http.post('/ajax/vote.php', "pronounce=#{pronounce}&word=#{word}", 'User-Agent' => '[email protected]') | |
puts "increment #{pronounce}/#{word}" | |
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
{% if site.coderwall_user %} | |
<section class="well"> | |
<ul class="nav"> | |
<li class="nav-header">Coderwall Badges</li> | |
</ul> | |
<div id="coderwall_badges"></div> | |
<a href="http://coderwall.com/{{site.coderwall_user}}">@{{site.coderwall_user}}</a> on coderwall | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$.getJSON("http://coderwall.com/{{site.coderwall_user}}.json?callback=?", function(data){ |
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
<turboFilter class="ch.qos.logback.classic.turbo.MarkerFilter"> | |
<Marker>MarkerExample</Marker> | |
<OnMatch>DENY</OnMatch> | |
</turboFilter> |
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._ | |
trait BarTrait {} | |
class Hoge {} | |
class TraitGetClassTest extends Specification { | |
"Trait mixin " should { | |
"getClass " in { | |
val hoge = new Hoge with BarTrait | |
hoge.isInstanceOf[Hoge] must beTrue | |
} | |
} |
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
scala> val txt = "foo" + "bar" match { case s => {println(s);s} } | |
foobar | |
txt: java.lang.String = foobar | |
scala> val txt = "foo" + ("bar" match { case s => {println(s);s} }) | |
bar | |
txt: java.lang.String = foobar | |
だから |
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
object Main { | |
def main(args: Array[String]){ | |
Main puts "Main" | |
this puts "this" | |
// puts "foo" これがダメなのなんで??? | |
} | |
def puts(text:String){ | |
println(text) | |
} | |
} |
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 ruby | |
require 'github/markup' | |
require 'tempfile' | |
if ARGV[0] && File.exists?(file = ARGV[0]) | |
html = GitHub::Markup.render(file) | |
tmp = Tempfile::new(['','.html']) | |
tmp.write(html) | |
tmp.close |