This file contains 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 :development, :test do | |
gem 'rspec-rails', '~> 3.1.0' | |
gem "shoulda-matchers" | |
gem 'factory_girl_rails', '~> 4.4.1' | |
gem 'faker', '~> 1.4.3' | |
gem 'capybara', '~> 2.4.3' | |
gem 'poltergeist' | |
gem 'database_cleaner', '~> 1.3.0' | |
end |
This file contains 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 python | |
# encoding: utf-8 | |
import sys | |
import sqlite3 | |
from collections import namedtuple | |
conn = sqlite3.connect("wnjpn.db") | |
Word = namedtuple('Word', 'wordid lang lemma pron pos') |
This file contains 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 main | |
import ( | |
"fmt" | |
"flag" | |
"os" | |
) | |
func main() { | |
flag.Parse() |
This file contains 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
// Playground - noun: a place where people can play | |
//can run beta3 | |
//Hello world | |
println("Hello world") | |
//変数と定数 | |
var myVariable = 42 | |
let myConstant = 42 |
This file contains 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 'Base64' | |
File.open(ARGV[1], 'wb') do|f| | |
f.write(Base64.decode64(ARGV[0])) | |
end |
This file contains 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
data = "data:audio/amr;base64,AAAA" | |
/data:(.*);(.*),(.*)/ =~ data | |
p $1 # => audio/amr |
This file contains 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
val hello : String? = "hello" | |
var bye : String? = "bye" | |
//(hello or bye).length is error (need ? or !!) | |
hello!! | |
hello.length //ok | |
bye!! | |
//bye.length is error (need ? or !!) | |
bye?.length // if bye == null, return null |
This file contains 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
max_length = 5 | |
password = 'poor' | |
chars = ('a'..'z').to_a | |
searches = Array.new | |
searches << "" | |
length = 0 | |
while true | |
new_searches = Array.new | |
length += 1 |
This file contains 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/python | |
#coding=utf-8 | |
"""**************************************************************************** | |
Copyright (c) 2014 cocos2d-x.org | |
http://www.cocos2d-x.org | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |