Skip to content

Instantly share code, notes, and snippets.

View asus4's full-sized avatar
:octocat:
Working from home

Koki Ibukuro asus4

:octocat:
Working from home
View GitHub Profile
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@bbrewer97202
bbrewer97202 / heroku-htaccess.md
Created August 10, 2012 18:20
Simple htaccess authentication on Heroku with cedar/php

Create an .htaccess file in the webroot:

AuthUserFile /app/www/.htpasswd
AuthType Basic
AuthName "Restricted Access"
Require valid-user

Create a .htpasswd file:

htpasswd -c /app/www/.htpasswd [username]

@asus4
asus4 / ModelAnimationSpliter.cs
Last active October 6, 2015 14:58
Split Model Animation with CSV
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
/// <summary>
/// Model animation spliter.
/// by Koki Ibukuro @asus4
/// </summary>
public class ModelAnimationSpliter : EditorWindow {
TextAsset csvAsset;
@asus4
asus4 / CreateTool.cs
Last active October 6, 2015 09:08
Editor Utility Tool
using UnityEngine;
using UnityEditor;
using System.Collections;
/// <summary>
/// Editor Utility tool.
/// author koki ibukuro
/// </summary>
public class CreateTool : ScriptableObject {
@dnpp73
dnpp73 / xcode4shortcut.md
Created March 20, 2012 12:16
Xcode 4 で俺がよく使うショトカまとめ

作業エリアのショトカなど


  • 左のエリアのアレ切り替え
    Cmd + [0-7]

  • 右のエリアのアレ切り替え
    Cmd + Option + [0-2]

  • 右のエリアのアレ切り替えその二

@jstanden
jstanden / gist:1489447
Last active May 15, 2024 20:47
Simplex Noise in C# for Unity3D - Adapted from James Livingston's MinePackage: http://forum.unity3d.com/threads/minepackage-minecraft-starter-package.69573/
using UnityEngine;
using System.Collections;
public class SimplexNoiseGenerator {
private int[] A = new int[3];
private float s, u, v, w;
private int i, j, k;
private float onethird = 0.333333333f;
private float onesixth = 0.166666667f;
private int[] T;
@mash
mash / index.tx
Created December 14, 2011 05:17
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
</head>
<body>
<script>
$( function() {
$.getScript("http://platform.twitter.com/widgets.js", function(){
#!/usr/local/bin/macruby
require 'rubygems'
require 'xcodeproj'
projpath = ARGV[0] + "/Unity-iPhone.xcodeproj"
proj = Xcodeproj::Project.new(projpath)
proj.targets.each do |target|
next unless target.name == "Unity-iPhone"
target.buildConfigurations.each do |config|
@darktable
darktable / MiniJSON.cs
Created November 30, 2011 23:08
Unity3D: MiniJSON Decodes and encodes simple JSON strings. Not intended for use with massive JSON strings, probably < 32k preferred. Handy for parsing JSON from inside Unity3d.
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining
@keijiro
keijiro / AndroidManifest.xml
Created November 25, 2011 04:56
Development Player Android Manifest file (Unity 3.4.2)
<?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:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"