This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gistPrefix = 'http://gist.github.com/', | |
cachedWrite = document.write, | |
body = $('body'), | |
gists = $('p.gist').map(function(n, p) { | |
p = $(p); | |
var a = $('a', p), | |
href = a.attr('href'); | |
if (a.length && href.indexOf(gistPrefix) == 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var z="http://gist.github.com/",y=document.write,x=$("body"),w=$("p.gist").map(function(b,a){a=$(a);var c=$("a",a),u=c.attr("href");if(c.length&&u.indexOf(z)==0)return{p:a,id:u.substring(z.length)}}).get(),v=function(){if(w.length==0)document.write=y;else{var b=w.shift();document.write=function(){document.write=function(a){b.p.replaceWith(a);v()}};x.append('<scr'+'ipt src="'+z+b.id+'.js"></scr'+'ipt>')}};v(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
meter{ | |
display: block; | |
border: 1px outset; | |
height: 20px; | |
width: 100px; | |
overflow: hidden; | |
} | |
meter div | |
{ | |
display: block; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hmac | |
import simplejson as json | |
from base64 import urlsafe_b64decode | |
from hashlib import sha256 | |
def parse_signed_request(signed_request, secret): | |
[encoded_sig, payload] = signed_request.split('.') | |
# decode data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Update() { | |
if ( Vector3.Distance( enemy.position, transform.position ) < 10 ) | |
print("I sense the enemy is near!"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Category: This is a free-form string used to categorise your events. | |
// Action: Another free-form string which represents the type of event, ex. “killed” and “game_start”. | |
// Label: This is an optional string parameter to the action. | |
// Value: This is an optional fractional number parameter to the action. | |
Application.ExternalCall("pageTracker._trackEvent", new object[] { category, action, label, value} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public enum GameStatus | |
{ | |
Setup, | |
Initializing, | |
ReInitializing, | |
AwaitingMasterServer, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public enum GameStatus | |
{ | |
Setup, | |
Initializing, | |
ReInitializing, | |
AwaitingMasterServer, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections.Generic; | |
public class MyStateMachine : MonoBehaviour | |
{ | |
public delegate void StateHandlerDelegate (); | |
public enum MyStateType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cgi | |
from google.appengine.api import mail | |
from google.appengine.ext import deferred | |
from ndb import model | |
from tipfy.routing import url_for | |
from tipfyext.ndb.mixins import DateMixin | |
OlderNewer