Skip to content

Instantly share code, notes, and snippets.

@LiamDobbelaere
LiamDobbelaere / ObjectPool.cs
Created July 20, 2019 21:39
Unity Object Pool
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ObjectPool : MonoBehaviour
{
[System.Serializable]
public struct PoolConfiguration
{
public string objectName;

Keybase proof

I hereby claim:

  • I am tomdobbelaere on github.
  • I am tomdobbelaere (https://keybase.io/tomdobbelaere) on keybase.
  • I have a public key ASBm86z8-9_c4Fu33zYSOtFy0FLL9hvu-nThNfbc11YXuQo

To claim this, I am signing this object:

@LiamDobbelaere
LiamDobbelaere / node.js
Last active March 12, 2019 17:21
Node oneliner to convert a facebook message.json to a plaintext, alphanumeric chars only
fs.writeFileSync('out.txt', JSON.parse(fs.readFileSync("message.json")).messages.filter(m => m.sender_name == 'Tom Dobbelaere' && m.content.match(/^[0-9a-zA-Z ]+$/)).map(m => m.content).join('\n'))
@LiamDobbelaere
LiamDobbelaere / MusicPlayer.cs
Created February 27, 2019 23:08
This Unity behaviour acts as a music playlist, crossfading and looping through an entire audio playlist
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MusicPlayer : MonoBehaviour
{
private AudioSource aTrack;
private AudioSource bTrack;
private bool aTrackIsMain;
private float maxTrackVolume = 0.5f;
@LiamDobbelaere
LiamDobbelaere / internetlog27.py
Last active August 1, 2018 13:20
Internet connection logging script for Python 27
import time
import datetime
try:
import httplib
except:
import http.client as httplib
def have_internet():
conn = httplib.HTTPConnection("www.google.com", timeout=5)