Skip to content

Instantly share code, notes, and snippets.

View Teino1978-Corp's full-sized avatar

Teino Boswell Teino1978-Corp

  • Ocho Rios, Jamaica
View GitHub Profile
//: Playground - noun: a place where people can play
import Foundation
func tablesOfTwo(x: Int) -> Int {
return 2 * x;
}
func tablesOfThree(x: Int) -> Int {
return 3 * x;
@Teino1978-Corp
Teino1978-Corp / gist:2912c417f9a8cd9a4549
Created October 30, 2015 18:41 — forked from samaaron/gist:3607725
Random circles with Raphael.js & ClojureScript
(ns hello-world.hello)
(defn- clj-map->js-map
"makes a javascript map from a clojure one"
[cljmap]
(let [out (js-obj)]
(doall (map #(aset out (name (first %)) (second %)) cljmap))
out))
(defn- attr [object attributes]
@Teino1978-Corp
Teino1978-Corp / jsGettersAndSetters.js
Created October 30, 2015 18:12 — forked from dnasca/jsGettersAndSetters.js
Getters and Setters in JS, the easy way.
//getters and settings done easy
var Circle = function(radius) {
this._radius = radius;
};
Circle.prototype = {
set radius(radius) {this._radius = radius;},
get radius() { return this._radius;},
get area() { return Math.PI * (this._radius * this._radius);}
};
![](http://i.imgur.com/2iI8b9a.gif)
@Teino1978-Corp
Teino1978-Corp / Space-filling curve layout (Hilbert)
Last active October 30, 2015 08:54 — forked from nitaku/README.md
Space-filling curve layout (Hilbert)
An example of [a space-filling curve layout](http://bl.ocks.org/nitaku/8772179) using [the Hilbert curve](http://bl.ocks.org/nitaku/6514960) to represent the *flare* software package classes.
@Teino1978-Corp
Teino1978-Corp / hilbert_curve.py
Created October 30, 2015 08:38 — forked from mdickinson/hilbert_curve.py
Code to create the third-order approximation to a 3d space-filling Hilbert curve
import numpy
def hilbert():
"""
Return NumPy array of shape (512, 3) containing successive coordinates
for a third-order three-dimensional Hilbert curve.
"""
a,b,c=numpy.indices((8,)*3).reshape(3,-1)
d=c[:8];r=abs(d-3>>1);g=(d^d>>1)*73;f=g[abs(d-1)&6]
@Teino1978-Corp
Teino1978-Corp / README.md
Created October 30, 2015 08:15 — forked from nitaku/README.md
Hilbert treemap (full hierarchy)
@Teino1978-Corp
Teino1978-Corp / hilbert.elm
Created October 30, 2015 07:55 — forked from mango314/hilbert.elm
hilbert space filling curve
main : Element
main = collage 400 400
(map (move (50, 0) )(
(motif x red ) ++ (motif (t x) blue ) ++ (motif (t (t x)) green ) ++
(motif (t (t (t x))) orange ) ))
-- build motif from path and color
motif : [(number, number)] -> Color -> [Form]
motif z color = [ traced (solid color) (path z) , move ( last z) (filled color (circle 3.0))]
@Teino1978-Corp
Teino1978-Corp / README.txt
Created October 30, 2015 05:28 — forked from t2-support-gists/README.txt
Payment PHP app1
AT&T API Samples - Payment app 1
------------------------------
This file describes how to set up, configure and run the Java Applications of the AT&T HTML5 Program sample applications.
It covers all steps required to register the application on DevConnect and, based on the generated API keys and secrets,
create and run one's own full-fledged sample applications.
1. Configuration
2. Installation
@Teino1978-Corp
Teino1978-Corp / config.php
Created October 30, 2015 05:25 — forked from t2-support-gists/config.php
Payment PHP app2
<?php
$oauth_file = "/tmp/paytoken.php";
$api_key = "";
$secret_key = "";
$FQDN = "https://api-uat.san1.attcompute.com/";
$subscriptionRedirect = "";
?>