Skip to content

Instantly share code, notes, and snippets.

@sugimotoak
sugimotoak / cloc_iOS_def.txt
Created June 8, 2015 04:29
cloc --force-lang=xml,storyboard --force-lang=xml,xib --force-lang=xml,plist --force-lang='Objective C',m --write-lang-def=cloc_iOS_def.txt
ABAP
filter remove_matches ^\*
extension abap
3rd_gen_scale 5.00
ADSO/IDSM
filter remove_matches ^\s*\*[\+\!]
extension adso
3rd_gen_scale 3.00
AMPLE
filter remove_matches ^\s*//
@sugimotoak
sugimotoak / AnimationScript.cs
Created December 22, 2013 16:43
Unity+OculusRift+LeapMotionで3Dキャラクターに触れる ref: http://qiita.com/sugimotoak/items/1d3574a5a084d0c349cd
using UnityEngine;
using System.Collections;
public class AnimationScript : MonoBehaviour {
public GameObject miku = null;
private Animation mikuAnime;
// Use this for initialization
void Start () {
@sugimotoak
sugimotoak / multi_language_gen.js
Last active December 25, 2015 18:39
[GoogleAppsScript][Android][iOS]generate multi-language file string.xml Localizable.strings
/**
* output string.xml into GoogleDrive
*/
function outputStringXml_Android() {
// read Spreadsheet
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
var numCols = rows.getNumColumns();
@sugimotoak
sugimotoak / FontFitTextView.java
Created December 17, 2012 01:11 — forked from STAR-ZERO/FontFitTextView.java
既存のサイズとは関係なく、最大サイズで表示する。 最大サイズは34Fとする。
import android.content.Context;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.widget.TextView;
/**
* サイズ自動調整TextView
*
*/
@sugimotoak
sugimotoak / totsuzennoshiGenerator
Created August 23, 2012 02:37
_人人人人人人_ > 突然の死 <  ̄Y^Y^Y^Y^Y ̄ を作ってくれるAppleScript
property hankakuText : " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-+*/=(){}[].,~!?@\"\\#$%&¥|'^;:<>_アイウエオカキクケコサシスセソタチツテトナニヌネノハヒムヘホマミムメモヤユヨワヲンァィゥェォャュョー`。、・「」"
display dialog "突然の死ジェネレータ" default answer "突然の死"
set str to text returned of result
set textSize to getTextSize(str)
set the clipboard to text of getUpText(textSize) & getMidText(str) & getBoText(textSize)
on getBoText(theTextSize)
set centerText to ""
set cnt to theTextSize div 2.0