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
module Kernel | |
def p(arg) | |
BubbleWrap.p(arg) if RUBYMOTION_ENV != 'release' | |
end | |
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
Show hidden characters
// Packages/User/ApplySyntax.sublime-settings | |
{ | |
// If you want exceptions reraised so you can see them in the console, change this to true. | |
"reraise_exceptions": false, | |
// If you want to have a syntax applied when new files are created, set new_file_syntax to the name of the syntax to use. | |
// The format is exactly the same as "name" in the rules below. For example, if you want to have a new file use | |
// JavaScript syntax, set new_file_syntax to 'JavaScript'. | |
"new_file_syntax": false, |
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
base_dir = "/var/www/hoge_server" | |
worker_processes 20 | |
working_directory "#{base_dir}/current" | |
shared = "#{base_dir}/shared" | |
listen "#{shared}/tmp/sockets/unicorn.sock" | |
timeout 30 | |
pid "#{shared}/tmp/pids/unicorn.pid" | |
stderr_path "#{shared}/log/unicorn.stderr.log" | |
stdout_path "#{shared}/log/unicorn.stdout.log" |
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
#!/bin/sh | |
# copy sdk | |
XCODE4=/Applications/Xcode4.app/Contents/Developer | |
XCODE5=/Applications/Xcode.app/Contents/Developer | |
SIM_DIR=Platforms/iPhoneSimulator.platform/Developer/SDKs | |
IOS_DIR=Platforms/iPhoneOS.platform/Developer/SDKs | |
rsync -av ${XCODE4}/${SIM_DIR}/iPhoneSimulator6.1.sdk ${XCODE5}/${SIM_DIR} |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "centos6.4" |
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 User | |
attr_accessor :name | |
def initialize(name = '') | |
@name = name | |
end | |
def initWithCoder(decoder) | |
self.init | |
self.name = decoder.decodeObjectForKey('name') |
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
# Homebrew のインストール | |
# 公式 (http://brew.sh/) に載っているコマンドです | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Ruby のビルドに必要なものをインストール | |
brew install openssl readline rbenv ruby-build # 時間がかかります | |
# rbenv 用の設定を .bash_profile に書き込む | |
echo 'export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl) --with-readline-dir=$(brew --prefix readline) $RUBY_CONFIGURE_OPTS"' >> ~/.bash_profile | |
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile |
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 User < ActiveRecord::Base | |
has_secure_password | |
validates :email, presence: true, uniqueness: true | |
validates :password, length: { minimum: 6, if: ->(u) { u.password.present? } } | |
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
require 'minitest/autorun' | |
describe Array do | |
before do | |
@array = Array.new | |
end | |
describe '#push' do | |
it '要素が追加されること' do | |
@array.push 'foo' |
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
{ | |
// If you want exceptions reraised so you can see them in the console, change this to true. | |
"reraise_exceptions": false, | |
// If you want to have a syntax applied when new files are created, set new_file_syntax to the name of the syntax to use. | |
// The format is exactly the same as "name" in the rules below. For example, if you want to have a new file use | |
// JavaScript syntax, set new_file_syntax to 'JavaScript'. | |
"new_file_syntax": false, | |
// Put your custom syntax rules here: |