Skip to content

Instantly share code, notes, and snippets.

View STAR-ZERO's full-sized avatar

Kenji Abe STAR-ZERO

View GitHub Profile
@STAR-ZERO
STAR-ZERO / Android resize drawable.jsx
Last active May 31, 2020 07:16
Androidのxxxhdpiの画像から各解像度にリサイズするPhotoshopスクリプト
try {
var xxhdpiImage = File.openDialog("Select xxxhdpi file.", "*.png", false);
if (xxhdpiImage == null) {
throw "";
}
var doc = open(xxhdpiImage, OpenDocumentType.PNG);
if (doc == null) {
@STAR-ZERO
STAR-ZERO / PostprocessBuildPlayer.rb
Last active February 21, 2020 05:44
UnityのiOSビルド時にローカライズファイルを設定する
#!/usr/bin/env ruby
require 'xcodeproj'
require 'fileutils'
PROJECT = 'Unity-iPhone'
TARGET = 'Unity-iPhone'
LIBRARY = 'Libraries'
LOCALIZE = 'Localize'
@STAR-ZERO
STAR-ZERO / PostprocessBuildPlayer.rb
Last active June 12, 2023 10:26
UnityのiOSビルド時にFrameworkを追加する
#!/usr/bin/env ruby
require 'xcodeproj'
require 'fileutils'
PROJECT = 'Unity-iPhone'
TARGET = 'Unity-iPhone'
LIBRARY = 'Libraries'
# システムFramework追加
@STAR-ZERO
STAR-ZERO / gist:6915250
Last active December 25, 2015 04:09
TestFlightへのアップロードスクリプト
#! /bin/sh
# TestFlight upload notes
while getopts "m:" opts
do
case $opts in
m)
NOTES=$OPTARG ;;
esac
done
@STAR-ZERO
STAR-ZERO / gist:5928936
Last active March 15, 2023 03:53
動的にiTerm2の背景画像を変える

動的にiTerm2の背景画像を変える

こんな感じのをzshrcに書く。この場合、@キーで画像が変わる。

image_list=("画像1" "画像2") # 絶対パス
image_index=1
bg() {
    if [ -z "$BUFFER" ]; then
        if test $image_index -eq 2; then
@STAR-ZERO
STAR-ZERO / gist:5444547
Created April 23, 2013 15:29
Sporkの使い方

Sporkの使い方

Gemfile

group :development, :test do
  gem 'rspec-rails'
  gem 'spork'
end
@STAR-ZERO
STAR-ZERO / gist:5335577
Last active December 15, 2015 22:49
HomebrewでMySQLのバージョンを指定して入れる

HomebrewでMySQLのバージョンを指定して入れる

$ cd /usr/local
$ brew versions mysql
5.6.10   git checkout aa3db07 Library/Formula/mysql.rb
5.5.29   git checkout 336c976 Library/Formula/mysql.rb
5.5.28   git checkout 5825f62 Library/Formula/mysql.rb
5.5.27   git checkout 93aecfa Library/Formula/mysql.rb
5.5.25a git checkout faaa6c1 Library/Formula/mysql.rb
@STAR-ZERO
STAR-ZERO / gist:5311165
Last active December 15, 2015 19:29
"Received disconnect from hostname: 2: Too many authentication failures for username" の対処方法

原因

.sshに鍵の登録しすぎ

解決方法1

~/.ssh/configに次のように書く

Host hogehoge.com
@STAR-ZERO
STAR-ZERO / gist:5176364
Last active December 15, 2015 00:59
VagrantとChef-soloの基本 かなり分かってないこと多いです

Vagrant

インストール

$ gem install vagrant

Box追加

@STAR-ZERO
STAR-ZERO / gist:5128887
Created March 10, 2013 14:59
thinの設定、起動、停止

thinの設定、起動、停止

設定ファイル

config/thin.ymlを作成

pid: tmp/pids/thin.pid
log: log/thin.log
servers: 1