Skip to content

Instantly share code, notes, and snippets.

@zaun
zaun / Bullet.cs
Created February 28, 2017 04:47
Unity3d Smart Object Pooling
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Bullet : PoolObject {
Rigidbody myRigidbody;
public override void OnAwake() {
if (myRigidbody == null) {
myRigidbody = GetComponent<Rigidbody> ();
@zaun
zaun / gist:e0d132bba0b87e546aed0af2f92db98e
Created February 15, 2017 00:27
Grunt Karma for vuejs
karma: {
unit: {
options: {
frameworks: ['jasmine'],
singleRun: true,
browsers: ['PhantomJS'],
reporters: ['spec', 'coverage'],
files: [
{ pattern: 'test/client/**/*-spec.js', watched: false }
],
@zaun
zaun / schemas
Last active September 28, 2016 23:34
{
"id": "AttributeCurrency#",
"title": "Currency type attribute schema",
"type": "object",
"properties": {
"_href": {
"type": "string",
"format": "url"
},
@zaun
zaun / Sat
Last active June 30, 2016 00:35
http://www.atmel.com/Images/Atmel-42348-SAM-D21L_Datasheet.pdf
ATSAMD21G18A-AU (-40 to 85)
http://www.mattairtech.com/images/MT-D21E/MT-D21E.png
(master module, 1)
-Bootloader-
i2c, slave - master bootloader channel
reset - system reset
-Runtime-
@zaun
zaun / Effect.cs
Created February 22, 2016 17:43
Unity3D Pools
using UnityEngine;
using System.Collections;
public class Effect : MonoBehaviour
{
/// <summary>
/// The array of emitters to fire when the effect starts.
/// </summary>
public ParticleEmitter[] emitters;
@zaun
zaun / plasma.js
Created February 19, 2016 23:06 — forked from rochal/plasma.js
plasma.js - Creating Plasma Fractal in JavaScript
/***************************************************************************
* Do What THe Fuck You Want To Public Licence 2 *
* *
* JavaScript implementation by Piotr Rochala (http://rocha.la/) *
* Based on C# work of Serge Meunier (http://www.smokycogs.com/) *
* *
* Check this code in action on http://rocha.la/javascript-plasma-fractal *
* *
**************************************************************************/
0 - Deep water (Low Ground Level)
1 - Water (Low Ground Level
2 - Low Ground
3 - High Ground
4 - Water (High Ground Level)
5 - Deep water (High Ground Level)