$ cd ~/project/oke-ya
$ cocos new -l cpp -p witch.oke-ya.com witch
$ cd witch
$ git init
$ curl -O https://gist.githubusercontent.com/yalab/c7f9e5158ef49e260fb9/raw/82126b290f15529cfdc9fecec1d9a500fddfa77e/.gitignore
$ rm -rf cocos2d
$ rm Resources/fonts/*
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/bash | |
COUNT="3" | |
HOST="google.com" | |
PING="/sbin/ping" | |
while true ;do | |
$PING -c $COUNT $HOST > /dev/null | |
if [ "$?" = "68" ];then | |
networksetup -setairportpower en0 on |
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
*.udf | |
*.apk | |
*.o | |
*.a | |
*.xcodeproj/* | |
!*.xcodeproj/project.pbxproj | |
!*.xcworkspace/contents.xcworkspacedata | |
**/*.xcodeproj/* | |
!**/*.xcodeproj/project.pbxproj | |
.DS_Store |
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
# config/initializers/puma_worker_killer.rb | |
module QuietPumaWorkerKillerLog | |
def log(str) | |
if !ENV["ENABLE_PUMA_WORKER_KILLER_LOG"] && str.split(/\s/)[0] == "PumaWorkerKiller:" | |
# Nothing to do | |
else | |
super | |
end | |
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
# config/initializers/active_record_save_scope_names.rb | |
ActiveSupport.on_load(:active_record) do | |
module SaveScopeNames | |
extend ActiveSupport::Concern | |
module ClassMethods | |
attr_reader :scope_names | |
def scope(*args) | |
@scope_names ||= [] | |
@scope_names << :"#{self.name.downcase}##{args.first}" | |
super |
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/bash | |
APP_NAME=$1 | |
if [ -z "$APP_NAME" ];then | |
echo "Usage: create_cocos app_name" | |
exit 1 | |
fi | |
COCOS="cocos2d-x/tools/cocos2d-console/bin/cocos" | |
COCOS_TEMPLATE="$(pwd)/cocos2d-x/tools/cocos2d-console/plugins/plugin_generate/bin-templates/cpp-template-default/res-portrait" |
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 'net/imap' | |
imap = Net::IMAP.new('imap.gmail.com', 993, true) | |
imap.login(ENV["GMAIL_USER"], ENV["GMAIL_PASSWORD"]) | |
imap.select("Inbox") | |
listprefix = "[Imap]/" | |
listname = "PROCESSED" | |
unless imap.list(listprefix, listname) | |
imap.create("#{listprefix}#{listname}") |
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/bash | |
FROM="山田_太郎" | |
POSTAL1="5_4_1" | |
POSTAL2="0_0_4_4" | |
ADDR1="大阪市_中央区" | |
ADDR2="伏見町_4-4-9" | |
TEL1="06" | |
TEL2="7878" | |
TEL3="6838" | |
TO="吉田_篤" |
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
GC.disable | |
before = `ps -o rss= -p #{Process.pid}`.to_i | |
require 'bundler/setup' | |
require 'mini_magick' | |
OUTPUT = "output.png" | |
MATERIAL = "material.png" | |
FONT_PATH = '/Library/Fonts/Osaka.ttf' | |
BACKGROUND_COLOR = "#000000" |
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
cd cocos2d | |
git checkout v3 | |
git pull | |
./download-deps.py |