Skip to content

Instantly share code, notes, and snippets.

View thomastraum's full-sized avatar
💭
Still on it

Thomas Traum thomastraum

💭
Still on it
View GitHub Profile
@kukat
kukat / custom.css
Last active November 14, 2016 13:49
nvAlt with code highlight template.html
/*
This is my hacked up copy of Marked.app/Contents/Resources/gridless.css
Changes:
1. Smaller headings
2. ~~No scrollbars~~ (I now prefer the Lion default behavior)
3. Styling of definition lists ala LaTeX description lists.
4. Centering h1.title, h3.author, h4.date (pandoc's title/author/date block).
@dariocravero
dariocravero / README.md
Created October 20, 2012 05:25
Save files in Meteor

Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.

@possibilities
possibilities / meteor-async.md
Created August 23, 2012 22:53
Meteor Async Guide

From Meteor's documentation:

In Meteor, your server code runs in a single thread per request, not in the asynchronous callback style typical of Node. We find the linear execution model a better fit for the typical server code in a Meteor application.

This guide serves as a mini-tour of tools, trix and patterns that can be used to run async code in Meteor.

Basic async

Sometimes we need to run async code in Meteor.methods. For this we create a Future to block until the async code has finished. This pattern can be seen all over Meteor's own codebase:

@roxlu
roxlu / testApp.cpp
Created May 22, 2012 19:49
1D linear convection
#include "testApp.h"
// generate random data for "u"
void testApp::setup(){
ofBackground(22,33,44);
float dt = 0.1;
for(int i = 0; i < N; ++i) {
u[i] = ofNoise(dt*i);
}
}
@roxlu
roxlu / testApp.cpp
Created May 21, 2012 19:37
Gradient field visualization (partial derivative)
#include "testApp.h"
testApp::testApp() {
}
void testApp::setup(){
ofBackground(22,33,44);
ofSetFrameRate(60);
grad_w = 50;
@roxlu
roxlu / ptf.cpp
Created December 27, 2011 22:05
Parallel Transport Frames - TEST
//--------------------------------------------------------------
void testApp::setup(){
ofSetFrameRate(60);
ofSetVerticalSync(true);
ofBackground(33);
donnie.create(125);
donnie.si.drawUsingQuads();
//renderer.addSceneItem(donnie.si);