Skip to content

Instantly share code, notes, and snippets.

View yuya's full-sized avatar

Yuya Hashimoto yuya

View GitHub Profile
@yuya
yuya / AndroidManifest.xml
Created May 22, 2014 10:18
Development Player Android Manifest file (Unity 4.3.4)
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
android:installLocation="preferExternal"
android:theme="@android:style/Theme.NoTitleBar"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
@yuya
yuya / coffee2json
Last active August 29, 2015 14:01
Coffee Script to JSON
#!/bin/sh
if ! type coffee > /dev/null 2>&1; then echo "Please install the coffee-script."; exit; fi
if [[ ! "${1}" =~ \.coffee$ ]]; then echo "File extension error"; exit; fi
echo \{
cat $1 | \
coffee --print --bare --compile --stdio | \
sed -e '1,2d; $d' | \
sed "s/\([^ '\"].*[^ '\"]\): /\"\1\": /"
unless Function::bind
Function::bind = (obj) ->
unless typeof this is "function"
throw new TypeError "Function.prototype.bind - what is trying to be bound is not callable"
slice = [].slice
args = slice.call(arguments, 1)
method = this
noop = ->
bound = ->
@yuya
yuya / lolcommits_to_gif_animation.sh
Created June 18, 2014 18:39
1日以内の lolcommits 画像を GIF アニ化する Shell script
#!/bin/sh
cd ~/.lolcommits && rm -rf tmp && mkdir tmp && find . -name "*.jpg" -mtime -1 -print0 | xargs -0 -J % cp % tmp && convert -delay 15 tmp/*.jpg ani.gif && rm -rf tmp
@yuya
yuya / gist:8497370df8380b1a1f6a
Created August 21, 2014 08:30
GoogleConversionTrackingBridge.java
/*
* GoogleConversionTrackingBridge.java
* Copyright (C) 2014 Yuya Hashimoto
*/
package im.yuya.unitygoogleconversiontrackingplugin;
import com.unity3d.player.UnityPlayer;
import android.app.Activity;
import java.util.Map;
@yuya
yuya / AndroidManifest.xml
Last active August 29, 2015 14:08
Android WebView で GeoLocation 許可
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="im.yuya.unitywebview"
android:installLocation="preferExternal"
android:theme="@android:style/Theme.NoTitleBar"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application android:icon="@drawable/app_icon"
using UnityEngine;
using System.Collections;
public class TestInterface : MonoBehaviour {
public string Url;
private string note;
public GUISkin guiSkin;
public GameObject redBoxPrefab;
public GameObject blueBoxPrefab;
@yuya
yuya / gist:324fc71ac45c88f6bd7a43e387daeb7d
Created May 6, 2016 09:59
Safari をシークレットウィンドウで開くワンライナー (JXA)
osascript -l JavaScript -e 'var s = Application("Safari"); var e = Application("System Events"); s.activate(); delay(0.1); e.keystroke("w", {"using": ["command down", "shift down"]}); delay(0.1); e.keystroke("n", {"using": ["command down", "shift down"]});'
@yuya
yuya / file1.txt
Created August 31, 2016 11:56
Created via API
Demo
@yuya
yuya / DownloadCurrentSheet2Xlsx.js
Last active December 13, 2017 02:15
[bookmarklet] 現在のシートのみを .xlsx 形式でダウンロード
javascript:(function(){var a=/^https:\/\/docs\.google\.com\/spreadsheets\/.+\/edit#gid=(\d+)$/;if(a.test(location.href)){var b=location.href.replace(/\/edit.+$/,"/export");a=["exportFormat=xlsx&format=xlsx","gid="+a.exec(location.href)[1]].join("&");window.open(b+"?"+a)}})();