Skip to content

Instantly share code, notes, and snippets.

View nasser's full-sized avatar
🛰️
save-lisp-and-die

Ramsey Nasser nasser

🛰️
save-lisp-and-die
View GitHub Profile
@nasser
nasser / index.md
Last active December 22, 2015 18:29
RFC: Event Queuing API

Fuck it, I'm just going to build it

@nasser
nasser / prism.cbl
Last active December 23, 2015 09:19
Prism Breakup Slideshow
https://vimeo.com/68486726
http://webpagesforhumans.com/#about:project
http://bengrosser.com/projects/scaremail/
http://www.pantheonapp.net/
http://www.milkred.net/vortex
http://www.tangointervention.org/
http://openprism.thomaslevine.com/
http://marie-e-julio.com/tearitdown
http://www.ameliamarzec.com/signalstrength
http://pplkpr.com/
JSONObject data;
void setup() {
data = loadJSONObject("http://api.openweathermap.org/data/2.5/weather?q=London,uk");
size(500,500);
}
void draw() {
float temprature = data.getJSONObject("main").getFloat("temp");
rectMode(CENTER);
// Talking to objects
// 1. Find the object
// 1.a Manually dragging in the editor (public variables only)
// 1.b GameObject.Find
// 1.c GameObject.FindWithTag
// 1.d GameObject.FindGameObjectsWithTag
//
// 2. Find the component
// 2.a Builtin (.transform)
// 2.b Custom (GetComponent<ComponentName>())
@nasser
nasser / towards.rb
Created December 5, 2013 21:05
Prints out numbers who's value is the same as the length of their spelled out form in a given language.
require 'json'
require 'open-uri'
require 'numbers_in_words'
require 'numbers_in_words/duck_punch'
class Numeric
def to_words language
if language == 'en'
self.in_words
/Applications/Unity/Unity.app/Contents/Frameworks/MonoBleedingEdge/bin/mono /Applications/Unity/Unity.app/Contents/Frameworks/MonoBleedingEdge/lib/mono/2.0/xbuild.exe build.proj /target:"Dist" /p:Runtime="Mono" /p:Configuration="Debug 3.5" /p:Platform="Any CPU"
/*
each of your game states can inherit from ofBaseApp if you're just
overriding update and draw and the like. this is the simplest thing
you can do and that's the example included here. other states besides
MenuState can be implemented in the same way.
more generally and more powerfully, you could create a GameState class
that all of your states inherit from. there, you would define methods
to override like update and draw, but also methods to handle switching
between states that each state can override. this requires an understanding
pos = x:20, y:20
setup = ->
createCanvas w:800, h:800
# square animation
timeline -> pos.x += 1 >= width - 50
timeline -> pos.y += 1 >= height - 50
timeline -> pos.x -= 1 <= 20
timeline -> pos.y -= 1 <= 20
(ns PlainClojureShit
(:import
(UnityEngine Debug)
(UnityEditor EditorGUILayout)))
(def happy (atom true)) ;; Multiple instances of this component will SHARE this atom! They should each have their OWN atom!
(defn start [this]
(Debug/Log "PlainClojureShit is starting"))
function Update () {
if(Input.GetKeyDown("space")) {
GetComponent(WeirdGravity).gravity.y = 30;
}
}