Skip to content

Instantly share code, notes, and snippets.

#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofBackground(255);
ofEnableSmoothing();
layoutPoints();
}
@mnmly
mnmly / prefix.js
Created October 28, 2014 15:49
dumb prefix
var p = document.createElement('p');
var prefixes = ['webkit','Moz','ms','O'];
var len = prefixes.length;
var style = p.style;
p = null;
module.exports = prefix;
function prefix(prop) {
for (i = 0; i < len; i++) {
var fs = require( 'fs' )
var struggle = fs.readFileSync( __dirname + '/struggle.txt', 'utf-8' )
console.log( mirror(struggle, 45, true ) );
console.log( '--------------------' );
console.log( mirror(struggle, 90, false ) );
function mirror( str, gap, keep ) {
var lines = str.split( '\n' )
@mnmly
mnmly / JS.js
Created January 11, 2012 01:14 — forked from johanbrook/JS.js
// Page init code is at the bottom
var Map = (function(map, $){
var exports = map || {};
var geo = new google.maps.Geocoder(),
geocode = {
address: [ config.project_location.street,
config.project_location.city,
config.project_location.country].join(", ")
@mnmly
mnmly / dabblet.css
Created January 11, 2012 05:47
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body{
padding: 100px;
}
.word-container{
@mnmly
mnmly / stack.html
Created January 13, 2012 16:37
CoffeeScript + Stylus Stack on jsbin.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>CoffeeScript+Stylus</title>
<script src="http://jashkenas.github.com/coffee-script/extras/coffee-script.js"></script>
<script src="http://learnboost.github.com/stylus/stylus.js"></script>
<style id="stylus">
body
font-family helvetica
@mnmly
mnmly / dabblet.css
Created January 17, 2012 23:05
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body{
padding: 100px;
}
.word-container{
@mnmly
mnmly / dabblet.css
Created January 19, 2012 08:38
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body{
padding: 100px;
}
.word-container{
@mnmly
mnmly / dabblet.css
Created January 24, 2012 21:55
Untitled
.wiggle{
position: relative;
font-size: 20em;
}
.wiggle span{
position: absolute;
}
span#top{
z-index: 3;
opacity: .8;
@mnmly
mnmly / app.coffee
Created February 7, 2012 01:05
Getting `500 Error: Invalid arguments passed to 'include' tag. `: integration with express.
express = require("express")
routes = require("./routes")
swig = require('swig')
app = module.exports = express.createServer()
app.configure ->
swig.init
root: __dirname + "/views"