Skip to content

Instantly share code, notes, and snippets.

View draco_node_roundtrip.js
// This is a minimal example showing how to create the Draco encoder module.
// The encoder module is created asynchronously, so you need to set a
// callback to make sure it is initialized before you try and call the module.
'use_strict';
import draco3d from 'draco3dgltf';
import fs from 'fs';
let encoderModule = null;
View c.patch
diff --git a/combined_html.c b/combined_html.c
index 4099206..ed8c089 100644
--- a/combined_html.c
+++ b/combined_html.c
@@ -992,7 +992,7 @@ unsigned char Language;
#define MAX_DISTRICTS 100
#define MIN_FERRY_SEGMENT 1000
#define MAX_FERRY_SEGMENT MIN_FERRY_SEGMENT + MAX_FERRYCROSSINGS
-#define MAX_ENTRIES MAX_HIGHWAYS + MAX_FERRYCROSSINGS + MAX_ACCESS_ROADS + 1 /* per region */
View 9v_extended2.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View decode.py
_rdecode = dict(zip('MDCLXVI', (1000, 500, 100, 50, 10, 5, 1)))
def decode( roman ):
result = 0
for r, r1 in zip(roman, roman[1:]):
rd, rd1 = _rdecode[r], _rdecode[r1]
result += -rd if rd < rd1 else rd
return result + _rdecode[roman[-1]]
if __name__ == '__main__':
View run.1.same
Inserting documents...
Replicating to local destination
Replicating to remote destination
Source 1
sourceDb1 { foo: 'bar',
_id: '1',
_rev: '1-4a3066eabe69c7a33e5ba492116a6ee2' }
Source 2
sourceDb2 { bar: 'baz',
_id: '1',
View index.js
const segments = (state = {}, action) => {
switch (action.type) {
case actions.LOAD_SEGMENTS:
return {
...state,
segments: action.segments
.map(segments => segments.values_)
.reduce((result, item) => {
result[item.highway] = result[item.highway] || {};
result[item.highway][item.district] = result[item.highway][item.district] || {};
View .pocketrc
set frontLeft='keys'
set frontRight='phone'
set backLeft=''
set backRight='wallet'
@JDeuce
JDeuce / test_radio.py
Created May 1, 2012
test case for integer values with radio choice widget
View test_radio.py
from pyramid.config import Configurator
from pyramid.view import view_config
from colander import Schema, SchemaNode, Int, String
from deform.widget import RadioChoiceWidget
from deform.form import Form
import waitress