Skip to content

Instantly share code, notes, and snippets.

@jpsarda
jpsarda / FDrawingSprite.cs
Last active May 6, 2026 06:07
A class to draw lines with Futile, 2D engine for Unity3D. API inspired from Flash AS3 drawing API. Works with transparent colors. Cap styles : NONE, ROUND, SQUARE, TRIANGLE, ARROW Joint styles : MITER, ROUND, BEVEL Experimental (but working for most usages) support of borders (so far only supported with styles NONE / BEVEL).
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/* Author @jpsarda
* A drawing class.
*
* Examples :
*
@factormystic
factormystic / osiris.cs
Created June 3, 2012 21:47
Using speech recognition, speech synthesis, and the Wolfram Alpha API to make a simple Siri clone
var WA_API_KEY = @"";
var VoiceOut = new System.Speech.Synthesis.SpeechSynthesizer();
VoiceOut.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Adult, 0, CultureInfo.CurrentCulture);
VoiceOut.SetOutputToDefaultAudioDevice();
var WA = new WAClient(WA_API_KEY);
WA.OnResultReceived += (WAResult, input) =>
{
try
@leplatrem
leplatrem / ass2dcl.py
Created February 23, 2012 09:47
ass2dcl : conversion of ASS subtitles to XML DCSubtitle
"""
``ass2dcl`` converts subtitles from ASS to DCSubtitle format.
It depends on python3 and `pysub <http://pypi.python.org/pypi/pysubs>`_.
INSTALL
::
@darktable
darktable / MiniJSON.cs
Created November 30, 2011 23:08
Unity3D: MiniJSON Decodes and encodes simple JSON strings. Not intended for use with massive JSON strings, probably < 32k preferred. Handy for parsing JSON from inside Unity3d.
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active June 7, 2026 10:38
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh