Instantly share code, notes, and snippets.

View candyraid.conf
server {
root /var/www/candyraid/public_html; #your files go here
index index.html index.htm;
server_name localhost candyraid.com www.candyraid.com ""; #your domain name goes here
access_log /var/www/candyraid/logs/access.log; #make sure this file exists first!
error_log /var/www/candyraid/logs/errors.log; #make sure this file exists first!
location / {
View arrayexample.cs
Vector3 targetVector = gameObjectArray[waypoint].transform.position;
_navMeshAgent.SetDestination(targetVector);
View CharacterController2D.cs
using System.Collections;
using System.IO;
using UnityEngine;
[System.Serializable]
public class CharacterController2D : MonoBehaviour {
BoxCollider2D hitbox;
Rigidbody2D rigidBody;
public string statisticsFile;
View Monster.cs
using UnityEngine;
using States;
class Monster : MonoBehaviour {
//AI states
public UnityStateMachine<Monster> stateMachine;
//components
public Animator animator;
public Rigidbody2D rigidBody;
View Blowsnower.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Blowsnower : MonoBehaviour {
//structures
public enum Behaviour {
IDLE, WANDER, ATTACK, MELTED
}
View Ducci.cs
using System;
using System.Collections.Generic;
using System.Linq;
namespace Ducci {
static class DucciSolver {
///<summary>
///The entry point of the program
///</summary>
static void Main(string[] args) {
View GameController.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Tilemaps;
[RequireComponent(typeof(MapEtcher))]
public class GameController : MonoBehaviour {
public Tilemap tilemap; //set by the user
MapGenerator mapGenerator = new MapGenerator();
MapEtcher mapEtcher;
View Switcher.cpp
//This isn't really possible with templates, and even without templates it needs refactoring every time you want to add something new.
#include <functional>
#include <iostream>
#include <string>
 
class Switcher {
public:
Switcher(std::string s);
Switcher(int i);
View karma.conf.js
// Karma configuration
var webpackConfig = require('./webpack.config.js');
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
View lorem_ipsum.js
var lorem = ['Lorem', 'ipsum', 'dolor', 'sit', 'amet,', 'consectetur', 'adipiscing', 'elit.', 'Sed', 'at', 'ante.', 'Mauris', 'eleifend,', 'quam', 'a', 'vulputate', 'dictum,', 'massa', 'quam', 'dapibus', 'leo,', 'eget', 'vulputate', 'orci', 'purus', 'ut', 'lorem.', 'In', 'fringilla', 'mi', 'in', 'ligula.', 'Pellentesque', 'aliquam', 'quam', 'vel', 'dolor.', 'Nunc', 'adipiscing.', 'Sed', 'quam', 'odio,', 'tempus', 'ac,', 'aliquam', 'molestie,', 'varius', 'ac,', 'tellus.', 'Vestibulum', 'ut', 'nulla', 'aliquam', 'risus', 'rutrum', 'interdum.', 'Pellentesque', 'lorem.', 'Curabitur', 'sit', 'amet', 'erat', 'quis', 'risus', 'feugiat', 'viverra.', 'Pellentesque', 'augue', 'justo,', 'sagittis', 'et,', 'lacinia', 'at,', 'venenatis', 'non,', 'arcu.', 'Nunc', 'nec', 'libero.', 'In', 'cursus', 'dictum', 'risus.', 'Etiam', 'tristique', 'nisl', 'a', 'nulla.', 'Ut', 'a', 'orci.', 'Curabitur', 'dolor', 'nunc,', 'egestas', 'at,', 'accumsan', 'at,', 'malesuada', 'nec,', 'magna.', 'Nulla', 'facilisi.', 'Nunc', 'volutpat.', 'Ve