Skip to content

Instantly share code, notes, and snippets.

View tomlagier's full-sized avatar

Tom Lagier tomlagier

View GitHub Profile
<p align="center"><a href="http://slorta.org/index.php?option=com_content&amp;view=article&amp;id=232"><span style="font-size: medium;"><span style="color: transparent;"><span style="background-color: transparent;"><span><span style="background-color: #ffffff;"><span><span style="background-color: #2e2e2d;"><span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: small;"><span style="color: #ffff00;"><span style="background-color: #ffffff;"><span style="color: #ffffff;"><span style="background-color: #333333;">Jobs</span></span></span></span></span></span></span></span></span></span></span></span></span></a><span style="font-size: medium;"><span style="color: transparent;"><span style="background-color: transparent;"><span><span style="background-color: #ffffff;"><span><span style="background-color: #2e2e2d;"><span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: small;"><span style="color: #ffff00;"><span style="background-color: #ffffff;"><span style="color:
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"gjslint": {
function Day( steps, date ){
return Backbone.Model.extend({
//Set defaults
defaults: {
id : null,
steps: 100,
date : moment().format( 'YYYY-MM-DD H:mm:ss' )
},
/* globals SignallerPeerConnection */
$(function () {
'use strict';
var spc = new SignallerPeerConnection();
spc.on('localStreamAdded', function (stream) {
var local = document.getElementById('local');
local.src = URL.createObjectURL(stream);
@tomlagier
tomlagier / test.js
Created October 23, 2015 21:36
Basic snippet of code
this.currentlyRotating.addCubes(group);
let currentPosition,
pastPosition = ThreeHub.scene.mouse.raycaster.ray.intersectPlane(plane),
delta;
ThreeHub.$el.on('mousemove.cubeRotation', () => {
currentPosition = ThreeHub.scene.mouse.raycaster.ray.intersectPlane(plane);
delta = currentPosition[deltaAxis] - pastPosition[deltaAxis];
console.log({
This file has been truncated, but you can view the full file.
{
"faces": [33,1088,291,3,492,0,0,0,0,33,1087,297,7,488,1,2,3,4,33,1086,298,8,495,5,6,7,8,33,1085,295,6,496,0,0,0,0,33,1084,313,20,484,9,10,11,12,33,1083,314,21,499,13,14,15,16,33,1082,307,15,500,0,0,17,0,33,1081,317,19,483,18,19,20,21,33,1080,318,22,503,22,23,24,25,33,1079,310,18,504,26,27,28,29,33,1078,321,12,476,30,31,32,33,33,1077,322,23,507,34,35,36,37,33,1076,309,17,508,38,39,40,41,33,1075,325,16,480,42,43,44,45,33,1074,326,24,511,46,47,48,49,33,1073,303,11,512,0,0,0,0,33,1072,369,64,472,50,0,0,51,33,1071,370,65,515,52,0,0,53,33,1070,343,39,516,0,0,0,0,33,1069,373,63,471,54,55,56,57,33,1068,374,66,519,58,59,60,61,33,1067,366,62,520,62,63,64,65,33,1066,377,32,440,66,67,68,69,33,1065,378,67,523,70,71,72,73,33,1064,365,61,524,74,75,76,77,33,1063,381,60,468,78,79,80,81,33,1062,382,68,527,82,83,84,85,33,1061,349,45,528,86,87,88,89,33,1060,385,59,467,90,91,92,90,33,1059,386,69,531,93,94,95,90,33,1058,362,58,532,96,97,98,99,33,1057,389,28,436,90,100,101,90,33,1056,390,70,535,90,102,103,90,33,1055,361,57,53
constructor() {
this.lights = {
ambientLight: new THREE.AmbientLight(0x909090),
spotLight: new THREE.SpotLight(0xffffff, 1, 0, 0.4),
directlight: new THREE.DirectionalLight(0xEEEEEE)
};
this.setupLightPositions();
}
@tomlagier
tomlagier / typescriptreact.json
Last active February 19, 2016 23:00
Useful React snippets
{
"React component": {
"prefix": "comp",
"body": [
"import * as React from 'react';",
"import './${componentName}.scss';",
"",
"export default class ${componentName} extends React.Component<${props}, ${state}> {",
"",
"\trender() {",
@tomlagier
tomlagier / store-shape.js
Created March 3, 2016 22:03
Store shape
{
models: {
guest: {
view: {},
edit: {}
},
relationships: {
view: {},
edit: {}
/ -> SearchForm
/search?{QUERY} -> SearchResults
/profile/add -> GuestForm
/my-book/ -> MyBook
/dashboard -> JC Dashboard (RecentlyViewedGuests)
/profile/{GUEST_ID} -> GuestProfileDashboard
/profile/{GUEST_ID}/information -> GuestInformation