View myfacebookapp.js
/*
complete facebook sdk authorization/login in 20 lines (or less)
include https://connect.facebook.net/en_US/sdk.js in your html page
*/
function onLogin(response) {
if(response.status === "not_authorized") {
// send the user somewhere as they refused to authorize your app
}
}
View TerrainManager.cs
using UnityEngine;
using System.Collections;
using Utility;
public class TerrainManager : MonoBehaviour {
public GameObject playerGameObject;
public Terrain referenceTerrain;
public int TERRAIN_BUFFER_COUNT = 50;
public int spread = 1;
View terrarium.nuspec
<?xml version="1.0"?>
<package >
<metadata>
<id>Terrarium.Sdk</id>
<version>$version$</version>
<title>Terrarium SDK</title>
<authors>Microsoft, Bil Simser</authors>
<owners>Bil Simser</owners>
<licenseUrl>https://github.com/terrariumapp/terrarium-sdk/blob/master/LICENSE.md</licenseUrl>
<projectUrl>http://terrarium.azurewebsites.net/</projectUrl>
View build.bat
@echo Off
set config=%1
if "%config%" == "" (
set config=Release
)
set version=1.0.0
if not "%PackageVersion%" == "" (
set version=%PackageVersion%
)
View program.cs
using System;
using SignalR.Client.Hubs;
namespace FANS.Demo
{
internal class Program
{
private static void Main(string[] args)
{
try
View SentenceParser.cs
namespace System
{
public static class SentenceParser
{
public static string TrimSentence(this string @string, int length)
{
if (TheInputsAreNotValid(length, @string)) return AnEmptyString();
if (TheLengthIsLongerThanTheInputString(length, @string)) return TheOriginalString(@string);
if (TheNextCharacterIsEmpty(@string, length)) return TheNormallyParsedString(length, @string);
View redis.conf
# Redis configuration file for gemcutter
# Note on units: when memory size is needed, it is possible to specifiy
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
View redis.sh
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db