Skip to content

Instantly share code, notes, and snippets.

@twobob
twobob / ToonDeferredShading2017.shader
Created August 25, 2018 23:18 — forked from xDavidLeon/ToonDeferredShading2017.shader
Unity 5.6 Deferred Cel Shading Modification
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
// Modifications by David Leon. Copyright (c) 2017 Lince Works SL. MIT license (see license.txt)
Shader "ToonDeferredShading2017" {
Properties {
_LightTexture0 ("", any) = "" {}
_LightTextureB0 ("", 2D) = "" {}
_ShadowMapTexture ("", any) = "" {}
_SrcBlend ("", Float) = 1
_DstBlend ("", Float) = 1
@twobob
twobob / Dungeon.cs
Created August 25, 2018 23:16 — forked from xDavidLeon/Dungeon.cs
Zelda Dungeon Generator for Unity 3D
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Dungeon : MonoSingleton<Dungeon>
{
[System.Serializable]
public class Position
{
public int x = 0;
@twobob
twobob / A set of Unity3D extension methods
Created August 18, 2018 18:28 — forked from omgwtfgames/A set of Unity3D extension methods
Some useful extension method for Unity3D
A collection of useful C# extension methods for the Unity engine.
@twobob
twobob / dungeon_maker.py
Created June 17, 2018 02:41 — forked from Alex-Huleatt/dungeon_maker.py
Simple dungeon maker. Guaranteed connectedness.
'''
@author AlexHuleatt
Generate a simple, connected dungeon. Focus is on rooms, not maze-like features.
Output of get_dungeon is two sets:
1. A set of (y,x) tuples representing the position of walls
2. A set of (y,x) tuples representing the walls removed to make doors
Guaranteed connectedness between all open cells.
@twobob
twobob / cpp_zahada.cpp
Created April 18, 2018 13:32 — forked from wermarter/cpp_zahada.cpp
Tiny Cutie Zahada Riddle Bot ( Using Web BRowser )
#include <windows.h>
#include <string>
#include <iostream>
using namespace std;
int main() {
string url; cin >> url;
url = "http://www.mcgov.co.uk/riddles/" + url + ".html";
ShellExecute(NULL, "open", url.c_str(), "", ".", SW_SHOWNORMAL);
return 0;
}
/*!
Math.uuid.js (v1.4)
http://www.broofa.com
mailto:[email protected]
Copyright (c) 2010 Robert Kieffer
Dual licensed under the MIT and GPL licenses.
*/
/*
@twobob
twobob / web-servers.md
Created May 12, 2017 03:32 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@twobob
twobob / clarifai_local_image_tagging.py
Last active May 20, 2017 18:44 — forked from devStepsize/clarifai_local_image_tagging.py
Local image tagging with Clarifai's Python client
import os
from os.path import expanduser
import glob
from clarifai import rest
from clarifai.client import ClarifaiApi
app = ClarifaiApi()
directory = expanduser('~/pictures/clarifai/')
txts=glob.glob1(directory, "*.tx?")
jpgs=glob.glob1(directory, "*.JPG")
txts = [suffix.replace('.JPG.txt', '.JPG') for suffix in txts]
@twobob
twobob / FindReferences.cs
Created April 15, 2017 03:18 — forked from mstevenson/FindReferences.cs
Find Unity objects that reference a selected asset
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class FindReferences : EditorWindow, ISerializationCallbackReceiver
{
List<string> displayedRefs = new List<string>();
@twobob
twobob / Instruments.cs
Created April 15, 2017 03:18 — forked from mstevenson/Instruments.cs
Unity tool for measuring execution time
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Debugging tools
/// </summary>
public static class Instruments
{
static string stopwatchName;