Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int main ()
{
unsigned seed;
seed = time( NULL );
srand( seed );
@thomaswrenn
thomaswrenn / courseCurriculumLinks
Created July 29, 2013 15:07
BS Program Course Curriculum
@thomaswrenn
thomaswrenn / index.js
Created June 4, 2014 20:49
NodObjC Block Experiments
var $ = require('NodObjC');
var types = require('./node_modules/NodObjC/lib/types')
, SEL = require('./node_modules/NodObjC/lib/sel')
, id = require('./node_modules/NodObjC/lib/id')
, Class = require('./node_modules/NodObjC/lib/class')
, IMP = require('./node_modules/NodObjC/lib/imp')
, block = require('./node_modules/NodObjC/lib/block')
$.import('Foundation');
@thomaswrenn
thomaswrenn / The needed block's Block Description
Last active August 29, 2015 14:02
NodObjCBlockExperiments
<NSMethodSignature: 0x1003003f0>
number of arguments = 2
frame size = 224
is special struct return? NO
return value: -------- -------- -------- --------
type encoding (v) 'v'
flags {}
modifiers {}
frame {offset = 0, offset adjust = 0, size = 0, size adjust = 0}
memory {offset = 0, size = 0}
@thomaswrenn
thomaswrenn / NetSuite REST API Roles GET Request
Last active September 17, 2018 20:17
NetSuite REST API Roles GET Request
GET /rest/roles HTTP/1.1
Authorization: NLAuth nlauth_email=dtorres@creativeworx.com, nlauth_signature=knr6M=c(]GQ33aJwb97m^Rvp9xmUe/+?&&C9tDKr}2iKQDo32N
Accept-Language: en-US
Accept: */*
Cookie: NS_VER=2015.2.0
Host: rest.netsuite.com
Connection: close
User-Agent: Paw/2.2.5 (Macintosh; OS X/10.11.1) GCDHTTPRequest
@thomaswrenn
thomaswrenn / gist:e7ce37a634d9f3ba890216bb83ac1064
Last active March 30, 2017 22:56 — forked from Andrew-Max/gist:305483febc3c367dbf57
Route lifecycle hooks guide from Ember meetup lightning talk
App.LibraryRoute = App.ApplicationRoute.extend({
activate: function () {
//no longer enter
this._super();
only called once on entering a route.
},
beforeModel: function () {
// any state you want in place before the model is initialized, this is called before any model promises are resolved
// also could be used to conditionally prevent access to a route by throwing transition.abort
@thomaswrenn
thomaswrenn / controllers.application.js
Last active April 20, 2017 06:51
Comparing fixedSort and Ember.computed.sort behavior
import Ember from 'ember';
export function fixedSort(arrayProp, ...sortProps) {
console.log(arrayProp, sortProps);
let parsedProps = sortProps.map((prop) => {
let [name, dir] = prop.split(':');
return [name, dir === 'desc' ? 1 : -1];
});
let observerString = `${arrayProp}.@each.{${parsedProps.map(prop => prop[0]).join(',')}}`;
function sortFn() {
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init() {
const FunMixin = Ember.Mixin.create({
fun() {
console.log('fun takeover');
this._super(...arguments);
}
@thomaswrenn
thomaswrenn / index.html
Last active July 30, 2017 08:11 — forked from supereggbert/index.html
3D Surface Plot in D3.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body {
font-family: sans;
padding: 10px;
}