- Ruby: lake(湖)をrakeと書き間違える
- OOP: インスタンスラーメン
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
| form > div:first-child { | |
| display: none !important; | |
| } |
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
| .bui_select{ | |
| display:inline; | |
| position:relative; | |
| &:after { | |
| content: ""; | |
| position: absolute; | |
| top: 50%; | |
| right: 20px; | |
| display: block; | |
| width: 0; |
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
| module A | |
| @@hoge = 300 | |
| end | |
| module B # Aのクラス変数をGet | |
| piyo = A.module_eval { class_variable_get :@@hoge } | |
| p piyo # => 300 | |
| 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
| NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; | |
| int value = [ud integerForKey:@"hogelo"]; // 値をとってくる | |
| UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"タイトルだお" | |
| message: [value description] // int型をNSStringに変換するお | |
| delegate: nil | |
| cancelButtonTitle: nil | |
| otherButtonTitles: @"OK", nil // nilを忘れない | |
| ]; |
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 'erb' | |
| str = "hello <%= sushi %>" | |
| sushi = "japan" | |
| erb = ERB.new str | |
| erb.result binding |
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
| str = "hogehoge" | |
| File.open "puyo.txt", "w" do |f| | |
| f.write str | |
| 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
| File.delete "filename.txt" |
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
| root = Dir.getwd.to_s | |
| bind "unix://#{root}/tmp/puma/socket" | |
| pidfile "#{root}/tmp/puma/pid" | |
| state_path "#{root}/tmp/puma/state" | |
| rackup "#{root}/config.ru" | |
| threads 4, 8 | |
| activate_control_app |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <link rel="stylesheet" type="text/css" href="iPhone5SC.countdown.css"> | |
| <link href='http://fonts.googleapis.com/css?family=Noto+Sans' rel='stylesheet' type='text/css'> | |
| <!--<script src="iPhone5SC.countdown.js"></script>--> | |
| </head> | |
| <body> | |
| <div class="icount"> | |
| <a href="http://apple.com/jp/iphone/"> |
OlderNewer