Skip to content

Instantly share code, notes, and snippets.

View fakestarbaby's full-sized avatar

Yoshinori Hirasawa fakestarbaby

View GitHub Profile
@fakestarbaby
fakestarbaby / file0.txt
Last active January 27, 2016 12:31
GitHub / GitLab で Unity 関連ファイルを折り畳んで楽々レビュー ref: http://qiita.com/fakestarbaby/items/c4f591062e5361b9b1a4
javascript:
String.prototype.endsWith = function(suffix) {
return this.indexOf(suffix, this.length - suffix.length) !== -1;
};
$('.file-header').each(function(index, value) {
var path = $(value).data('path');
var ignores = ['.unity', '.meta', '.anim', '.controller', '.prefab', '.asset', '.mat', '.tpsheet'];
for (i = 0; i < ignores.length; i++) {
@fakestarbaby
fakestarbaby / file0.txt
Created December 17, 2013 13:20
Lua でテーブルの中身が空かどうか判定する ref: http://qiita.com/fakestarbaby/items/9c9f930fec89f5315b1a
table = {}
if not next(users) then
print("Table is empty.")
else
print("Table is not empty.")
end
local GA = require ("GameAnalytics")
true
false
@fakestarbaby
fakestarbaby / file0.txt
Created December 11, 2013 07:01
Lua で実行中のファイル名称と行番号を取得する ref: http://qiita.com/fakestarbaby/items/385c8a8a8b8f0db6d57c
local debugInfo = debug.getinfo(1)
local fileName = debugInfo.source:match("[^/]*$")
条件式 and 真の時の値 or 偽の時の値
@fakestarbaby
fakestarbaby / file0.txt
Created December 8, 2013 15:42
Rails アプリケーションテンプレート超意訳 ref: http://qiita.com/fakestarbaby/items/01c46a273725d0a48b36
$ rails new blog -m ~/template.rb
$ rails new blog -m http://example.com/template.rb
@fakestarbaby
fakestarbaby / config.lua
Created December 2, 2013 17:31
Corona SDK + Parse.com でプッシュ通知をする ref: http://qiita.com/fakestarbaby/items/9b3a7b27f94170e191fb
application = {
content = {
width = 320,
height = 480,
scale = "letterBox",
fps = 30,
},
notification = {
iphone = {
-r turnip/rspec
@fakestarbaby
fakestarbaby / console
Created November 28, 2013 13:36
最新になっていない Gem を洗い出す ref: http://qiita.com/fakestarbaby/items/cdf2be9107a26ecc4234
$ bundle outdated
Updating git://github.com/byroot/rails3_acts_as_paranoid
Fetching gem metadata from https://rubygems.org/.......
Resolving dependencies...
Outdated gems included in the bundle:
* acts_as_paranoid (0.4.2 > 0.4.1 4265d9f)
* aws-sdk (1.29.0 > 1.11.1)
* devise (3.2.2 > 3.2.0)
* geokit (1.7.1 > 1.6.7)