- 2013 年で Web アプリケーションを作る時にモダンな方法で一通り Web アプリケーションを自分一人で作れるようになってもらう
- 作る過程で Web 開発で必要とされるスキルセットを身につけてもらう
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
targets = { | |
'3.5' => '540x960 -bordercolor "#F5F5F5" -border 50x0', | |
'4.0' => '640x1136!', | |
'4.7' => '750x1334!', | |
'5.5' => '1242x2208!' | |
} | |
targets.each do |k, v| | |
(1..4).each do |i| | |
system "mkdir #{k}inch" |
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
public class AssetBundleNameGenerator | |
{ | |
[MenuItem("AssetBundles/Set XXX")] | |
public static void SetXXX() | |
{ | |
foreach (var file in Directory | |
.GetFiles("Assets/XXX/XXX/", | |
"*.xxx", SearchOption.TopDirectoryOnly)) | |
{ | |
var importer = AssetImporter.GetAtPath(file); |
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 <UIKit/UIKit.h> | |
#import "AppDelegate.h" | |
int main(int argc, char * argv[]) | |
{ | |
@autoreleasepool { | |
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"UIDisableLegacyTextView"]; | |
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); |
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
# -*- coding: utf-8 -*- | |
module ActiveRecord | |
class Relation | |
def initialize(klass, table, values = {}) | |
@klass = klass | |
@table = table | |
@values = values | |
@loaded = false | |
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
# http://stackoverflow.com/questions/14972253/simpleform-default-input-class | |
# https://github.com/plataformatec/simple_form/issues/316 | |
inputs = %w[ | |
CollectionSelectInput | |
DateTimeInput | |
FileInput | |
GroupedCollectionSelectInput | |
NumericInput | |
PasswordInput |
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
class User < ActiveRecord::Base | |
def subscribe_mailchimp_list(client = Gibbon.new) | |
if ENV["MAILCHIMP_LIST_ID"] | |
logger.info "add #{self.email} to list #{ENV["MAILCHIMP_LIST_ID"]}" | |
client.list_subscribe(id: ENV["MAILCHIMP_LIST_ID"], | |
email_address: self.email, | |
double_optin: false, | |
send_welcome: false, | |
update_existing: true, | |
merge_vers: {:FNAME => self.first_name, |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<scheme name="PatorashRailscast" version="124" parent_scheme="Default"> | |
<option name="LINE_SPACING" value="1.0" /> | |
<option name="EDITOR_FONT_SIZE" value="12" /> | |
<option name="EDITOR_FONT_NAME" value="Menlo" /> | |
<colors> | |
<option name="CARET_COLOR" value="ffffff" /> | |
<option name="CARET_ROW_COLOR" value="333435" /> | |
<option name="CONSOLE_BACKGROUND_KEY" value="2b2b2b" /> | |
<option name="GUTTER_BACKGROUND" value="2b2b2b" /> |
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
N=10000 | |
M=3 | |
# 再帰・全探索 | |
# i = 残りの数値 | |
# j = 組み合わせ数 | |
# 4 1 = 1 | |
# 4 2 = 4 1 + (2 2 = 2 1 + (0 2 = 1) = 2) = 3 | |
# 4 3 = ... | |
# O(2**n)? |
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
class ActiveRecord::Base | |
# Usage: | |
# | |
# > puts User.first.to_factory_girl | |
# FactoryGirl.define do | |
# factory :user do | |
# ... | |
# end | |
# end | |
# # Usage: FactoryGirl.create(:user, ...) |
NewerOlder