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 / open_url.scpt
Created September 11, 2011 06:53
open location with new tab
-- open_url: open with Google Chrome
on run argv
tell application "Google Chrome"
tell window 1
set newTab to make new tab with properties {URL:item 1 of argv}
end tell
end tell
end run
(add-hook 'markdown-mode-hook
'(lambda ()
(define-key markdown-mode-map "\C-c\C-h1" 'markdown-insert-header-1)
(define-key markdown-mode-map "\C-c\C-h2" 'markdown-insert-header-2)
(define-key markdown-mode-map "\C-c\C-h3" 'markdown-insert-header-3)
(define-key markdown-mode-map "\C-c\C-h4" 'markdown-insert-header-4)
(define-key markdown-mode-map "\C-c\C-h5" 'markdown-insert-header-5)
(define-key markdown-mode-map "\C-c\C-h6" 'markdown-insert-header-6)
(define-key markdown-mode-map "\C-c\C-hs" 'markdown-insert-section)
(define-key markdown-mode-map "\C-c\C-ht" 'markdown-insert-title)
@seiji
seiji / Debug.cs
Last active September 29, 2015 21:57
using UnityEngine;
using System.Collections;
using System;
using System.IO;
using System.Text.RegularExpressions;
using UnityEngineInternal;
public static class Debug
{
public static bool isDebugBuild = true;
@seiji
seiji / gist:1735284
Last active September 30, 2015 06:08
build for ios using unity editor
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
/Applications/Unity/Unity.app/Contents/MacOS/Unity \
-batchmode \
-quit \
-projectPath $PROJECT_PATH \
-executeMethod CommandBuild.BuildiOS
string message = Time.realtimeSinceStartup.ToString() + " : [Elapsed]";
StackFrame CallStack = new StackFrame(1, true);
string SourceFile = CallStack.GetFileName();
int SourceLine = CallStack.GetFileLineNumber();
message += "\n - File: " + SourceFile + " Line: " + SourceLine.ToString();
Debug.Debug(message);
# -*- coding: utf-8 -*-
#
require 'rubygems'
require 'xcodeproj'
FRAMEWORKS = %w{
AudioToolbox
CFNetwork
CoreGraphics
CoreLocation
# -*- coding: utf-8 -*-
#
require 'rubygems'
require 'xcodeproj'
ADD_FRAMEWORKS = %w{
AddressBook
AVFoundation
GameKit
libicucore.A.dylib
(defun insert-datetime ()
(interactive "P")
(insert (format-time-string "%Y-%m-%d %H:%M:%SZ" nil "Z")))
mv ~/.rvm ~/.rvm_org
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
rvm reload
rvm pkg install readline
rvm pkg install openssl
rvm pkg install zlib
rvm pkg install iconv
rvm install ruby-1.9.3 --with-openssl-dir=~$HOME/.rvm/usr --with-iconv-dir=$HOME/.rvm/usr
@seiji
seiji / gist:2145615
Last active October 2, 2015 01:28
iPhonePlatformString
// ARMv6:
// iPhone (v1.0.0 ~ v3.1.3)
// iPhone 3G (v2.0.0 ~ v4.2.1)
// iPod Touch (v1.1.0 ~ v3.1.3)
// iPod Touch (2nd) (v2.1.2 ~ v4.2.1)
// ARMv7:
// iPhone 3GS (v3.0.0 ~ )
// iPhone 4 (GSM) (v4.0.0 ~ ) *
// iPhone 4 (CDMA) (v4.2.5 ~ ) *
// iPhone 4S (v5.0.0 ~ ) *