Skip to content

Instantly share code, notes, and snippets.

View seiji's full-sized avatar
🏠
Working from home

Seiji Toyama seiji

🏠
Working from home
View GitHub Profile
@seiji
seiji / jenkins-build-Unity-iPhone.sh
Created May 11, 2012 02:27
jenkins-build-Unity-iPhone-TestFlight
View jenkins-build-Unity-iPhone.sh
UNITY_APP_PATH=/Applications/Unity3.4/Unity.app/Contents/MacOS/Unity
UNITY_PROJECT_PATH=$WORKSPACE/Unity
UNITY_EDITOR_LOG_PATH=~/Library/Logs/Unity/Editor.log
XCODE_PROJECT_PATH=$WORKSPACE/Unity-iPhone
KEYCHAIN_LOCATION=~/Library/Keychains/login.keychain
XCODE_PROJECT_CONFIG_PATH=$XCODE_PROJECT_PATH/Unity-iPhone.xcodeproj
### EDIT AREA START
UNITY_BATCH_EXECUTE_METHOD=XXXXX
@seiji
seiji / aws-ssm-ec2.sh
Last active August 18, 2021 04:17
aws-ssm-ec2.sh
View aws-ssm-ec2.sh
#!/usr/bin/env sh
######## Usage #################################################################
# Setup
# - Install aws cli (https://aws.amazon.com/cli/)
# - Install session-manager-plugin (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html)
# - Move this script to ~/.ssh/aws-ssm-ec2.sh
# - Ensure it is executable (chmod +x ~/.ssh/aws-ssm-ec2.sh)
#
# Add following SSH Config Entry to ~/.ssh/config
@seiji
seiji / Vagrantfile
Last active January 25, 2021 07:31
Vagrantfile
View Vagrantfile
def install_plugin(plugin)
system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin
end
%w(vagrant-disksize vagrant-env vagrant-hostsupdater vagrant-docker-compose).each do |plugin|
install_plugin(plugin)
end
Vagrant.configure("2") do |config|
config.env.enable
@seiji
seiji / gen.sh
Created April 1, 2020 12:33
cert
View gen.sh
#!/bin/sh -e
DAYS=3650
PASS="pass"
WORKDIR=/etc/ssl
cd $WORKDIR
echo 01 > serial && touch index.txt
mkdir -p $WORKDIR/newcerts
View keybase.md

Keybase proof

I hereby claim:

  • I am seiji on github.
  • I am seiji (https://keybase.io/seiji) on keybase.
  • I have a public key ASANdLGv11-X3wzQbWIHJdRfK0s-zalS1oqO1na2Vhm7yAo

To claim this, I am signing this object:

@seiji
seiji / gist:50bcecd655ab1668c335d788adcfe0c9
Created December 17, 2019 03:42
Add index for elasticsearch bulk api
View gist:50bcecd655ab1668c335d788adcfe0c9
jq <test.json -c '. | {"index": {}}, .' | curl -XPOST -H "Content-Type: application/json" localhost:9200/myindex/_bulk --data-binary @-
@seiji
seiji / gist:3930237
Last active April 18, 2017 20:24
Append NSAttributedString
View gist:3930237
NSAttributedString *subjectString =
[[NSAttributedString alloc] initWithString:@"git"
attributes:@{
NSForegroundColorAttributeName : [UIColor blueColor],
NSFontAttributeName : [UIFont boldSystemFontOfSize:20]
}];
NSAttributedString *verbString = [[NSAttributedString alloc] initWithString:@" push -u "];
NSAttributedString *objectString =
[[NSAttributedString alloc] initWithString:@"origin master"
@seiji
seiji / gist:7783715
Created December 4, 2013 07:39
Build AssetBundle
View gist:7783715
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"
@seiji
seiji / Activity.java
Created August 13, 2013 03:40
Managing Audio Focus
View Activity.java
AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
audioManager.requestAudioFocus(new AudioService(), AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);