Seiji Toyama seiji

View gist:10700735
1 2 3 4 5 6 7 8 9 10
module ::Capistrano
class Configuration
module Actions
module Rsync
def self.included(base)
base.send(:alias_method, :old_upload, :upload)
base.send(:alias_method, :upload, :new_upload)
end
 
def new_upload(from, to)
View gist:9266806
1 2 3 4 5 6 7 8 9 10
rds-modify-db-parameter-group {param-group-name} \
--parameters="name=character_set_server, value=utf8, method=pending-reboot" \
--parameters="name=collation_server, value=utf8_general_ci, method=pending-reboot" \
--parameters="name=tmp_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \
--parameters="name=max_heap_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \
--parameters="name=query_cache_type, value=1, method=pending-reboot" \
--parameters="name=query_cache_size, value=131072, method=pending-reboot" \
--parameters="name=table_open_cache, value=2500, method=pending-reboot" \
--parameters="name=join_buffer_size, value={DBInstanceClassMemory/64}, method=pending-reboot" \
--parameters="name=thread_cache_size, value={DBInstanceClassMemory/12582880}, method=pending-reboot" \
View gist:7783715
1 2 3 4 5 6 7 8 9 10
require 'rake'
 
PROJECT_DIR = File.dirname __FILE__
UNITY_APP_PATH = "/Applications/Unity/Unity.app/Contents/MacOS/Unity"
UNITY_EDITOR_LOG_PATH = "~/Library/Logs/Unity/Editor.log"
 
Dir.glob('lib/tasks/**/*.rake').each{ |r| load r }
 
namespace "asset_bundle" do
desc "build asset bundle"
View Activity.java
1 2
AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
audioManager.requestAudioFocus(new AudioService(), AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);
View AndroidManifest.xml
1 2 3 4 5 6
<receiver android:name="me.seiji.AudioReceiver" >
<intent-filter>
<action android:name="android.media.AUDIO_BECOMING_NOISY" />
<action android:name="android.media.RINGER_MODE_CHANGED" />
</intent-filter>
</receiver>
View backend-architectures.md
View Capistrano-Deployment-Recipe.rb
1 2 3 4 5 6 7 8 9 10
# Guide
# Configure the essential configurations below and do the following:
#
# Repository Creation:
# cap deploy:repository:create
# git add .
# git commit -am "initial commit"
# git push origin master
#
# Initial Deployment:
View gist:5589113
1 2 3 4 5 6 7 8 9 10
一般的にはデフォルトの設定である
"Don't Create Position Independent Executables"NO
"Generate Position-Dependent Code", NO
であればPIE Binaryでビルドされるようです。
 
またiOS Deployment TargetiOS4.3未満(Xcode4.5未満)にした場合は上記の設定が効かない
 
> otool -vh test.app/Test
 
http://stackoverflow.com/questions/16455416/non-pie-binary-the-executable-project-name-is-not-a-position-independent-e/16457732#16457732
View gist:5419104
1 2 3 4 5 6 7 8 9 10
int main(int argc, char *argv[])
{
@autoreleasepool {
CFMessagePortCreateLocal(NULL, (CFStringRef) @"PurpleWorkspacePort", NULL, NULL, NULL);
return UIApplicationMain(argc, argv, nil, @"GHUnitIOSAppDelegate");
}
}
 
@implementation UIWindow (Private)
Something went wrong with that request. Please try again.