This file contains hidden or 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
#export REPO="repo-name" | |
#export LOC="./local/path" | |
APP_INDEX="index.js" | |
#APP_PM2="process-name" | |
source ~/.profile | |
mkdir -p ${LOC}/${REPO} | |
rm -Rf ${LOC}/${REPO}-old | |
mv ${LOC}/${REPO} ${LOC}/${REPO}-old | |
mv indieforger_${REPO} ${LOC}/${REPO} |
This file contains hidden or 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
[core] | |
legacyheaders = false | |
quotepath = false | |
pager = less -r | |
excludesfile = /Users/Marek/.gitignore | |
# autocrlf = true #uncomment on windows | |
[color] | |
ui = auto | |
interactive = auto | |
[alias] |
This file contains hidden or 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
# install mongodb | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 | |
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org |
This file contains hidden or 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
// Create our server | |
var server; | |
server = http.createServer(function(req,res){ | |
// Set CORS headers | |
res.setHeader('Access-Control-Allow-Origin', '*'); | |
res.setHeader('Access-Control-Request-Method', '*'); | |
res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET'); | |
res.setHeader('Access-Control-Allow-Headers', '*'); | |
if ( req.method === 'OPTIONS' ) { | |
res.writeHead(200); |
This file contains hidden or 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
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
This file contains hidden or 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; | |
using UnityEditor; | |
[CustomEditor (typeof(TriggerContainer))] | |
public class TriggerContainerEditor : Editor | |
{ | |
private SerializedObject obj; |
This file contains hidden or 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
/** | |
* @file PlayerPrefsSerializer.cs | |
* @brief Code snippet from UnityForum (http://forum.unity3d.com/threads/72156-C-Serialization-PlayerPrefs-mystery) | |
* @author mindlube+FizixMan | |
* @version 1.0 | |
* @date 2012-06-15 | |
*/ | |
using UnityEngine; | |
using System; |
This file contains hidden or 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
# ----------------------------------------------------------------- | |
# Minimalistic .gitignore for WordPress | |
# | |
# To get this file rub bellow wget command from project root directory | |
# wget -O .gitignore https://gist.github.com/indieforger/d915d8b430fef748f966/raw | |
# | |
# To ignore uncommitted changes in a file that is already tracked, | |
# use `git update-index --assume-unchanged`. | |
# | |
# To stop tracking a file that is currently tracked, |
This file contains hidden or 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
# Logs and temp files | |
[Ll]ogs/ | |
[Tt]emp/ | |
*.log | |
# Runtime data | |
pids | |
*.pid | |
*.seed |
This file contains hidden or 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 UnityEngine.UI; | |
using UnityEngine.Events; | |
using UnityEngine.EventSystems; | |
using System.Collections; | |
// inspired by: https://github.com/AyARL/UnityGUIExamples/blob/master/EventTrigger/Assets/TriggerSetup.cs | |
// gist: https://gist.github.com/rusticode/05b306f11aa4a33bb113 | |
[RequireComponent(typeof(RectTransform))] |