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
diff -r f6cacdc34495 src/Makefile | |
--- a/src/Makefile Wed Aug 07 21:13:23 2013 +0200 | |
+++ b/src/Makefile Sun Aug 11 16:00:41 2013 +0900 | |
@@ -1483,6 +1483,7 @@ | |
$(PYTHON_SRC) $(PYTHON3_SRC) \ | |
$(TCL_SRC) \ | |
$(RUBY_SRC) \ | |
+ $(MRUBY_SRC) \ | |
$(SNIFF_SRC) \ | |
$(WORKSHOP_SRC) \ |
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
Earthquake.init do | |
output do |item| | |
next unless item['text'] | |
next unless config[:separator] | |
unless config[:screen_width] | |
begin | |
require 'curses' | |
screen = Curses.init_screen | |
config[:screen_width] = screen.maxx |
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
class SampleResolver < ActionView::Resolver | |
include Singleton | |
def find_templates(name, prefix, partial, details) | |
scope = details[:database] # ActiveRecord::Relation | |
scope.map(&:to_template) | |
end | |
end | |
class Template < ActiveRecord::Base |
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
install | |
cdrom | |
lang ja_JP.UTF-8 | |
keyboard us | |
network --bootproto=dhcp | |
rootpw --iscrypted $1$damlkd,f$UC/u5pUts5QiU3ow.CSso/ | |
firewall --disabled | |
authconfig --enableshadow --passalgo=sha512 | |
selinux --disabled | |
timezone Asia/Tokyo |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
input_dir = ARGV[0] | |
Dir.chdir(input_dir) | |
mka_files = Dir.glob("*.mka") | |
mka_files.each do |filename| | |
basename = File.basename(filename, ".*") | |
unless File.exist?(basename) | |
Dir.mkdir(basename) |
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
input_dir = ARGV[0] | |
Dir.chdir(input_dir) | |
mka_files = Dir.glob("*.mka") | |
mka_files.each do |filename| | |
basename = File.basename(filename, ".*") | |
unless File.exist?(basename) | |
Dir.mkdir(basename) |
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
# root executes this script | |
# Install Libraries for build | |
yum -y install gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison wget unzip git | |
# Download Ruby | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz | |
tar xvzf ruby-1.9.3-p327.tar.gz | |
# Create Install Directory |
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
import Data.List | |
import Data.Char | |
import Control.Monad | |
import System.Environment | |
data Card = AMEX String | Discover String | MasterCard String | Visa String | Unknown deriving Show | |
detectCard :: String -> Card | |
detectCard cardNumber@(x:y:_) | |
| ("34" `isPrefixOf` cardNumber) || ("37" `isPrefixOf` cardNumber) = AMEX cardNumber |
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
import System.Environment | |
import Data.List | |
data Shape = L | I | T | O | S | Unknown deriving Show | |
testData = [ | |
[55,55,55,55], | |
[07,17,06,05], | |
[21,41,31,40], | |
[62,74,73,72], |