Skip to content

Instantly share code, notes, and snippets.

View cedricpinson's full-sized avatar

Cedric Pinson cedricpinson

View GitHub Profile
@cedricpinson
cedricpinson / emacs-jshint-reporter
Created January 3, 2014 13:01
Emacs reporter for jshint in compile buffer
/*jshint node: true */
var reporter_name = "jhlint";
module.exports = {
reporter: function (data) {
"use strict";
var str = '',
errors = [];
@cedricpinson
cedricpinson / shadernode
Last active August 29, 2015 14:10
shader node api tests
var inputVariables = [ a, b, c];
var outputVariable = factory.getVariable('vec4','outputResult');
factory.getNodeAdd().inputs(inputsVariables).output(outputVariable);
var normal = this.getOrCreateNormal();
var lightingInputs = {
lights: lights
normal: normal,
<link rel="stylesheet" type="text/css" href="http://www.(SITEWEB).com/sketchfab.css">
<div class="holder">
<iframe width="100%" height="100%" src="https://sketchfab.com/models/375ae80dc7e34b229cc9739b1ce92e2b/embed?autostart=1&autospin=0.2&controls=0&transparent=1&ui_watermark=0&stop_button=0&desc_button=0" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>
<a class="bouton" href="#blank">
<div class="bar">
<div class="info-bulle">
<p>Powered by <b>Sketchfab</b></p>
</div>
</div>
</a>
@cedricpinson
cedricpinson / parser.go
Created February 10, 2018 10:46
parse a data.csv in go
// -*- compile-command: "go run *.go sample.csv" -*-
package main
import (
"bufio"
"encoding/json"
"fmt"
"io"
"os"
@cedricpinson
cedricpinson / parser.rs
Last active February 12, 2018 20:25
parser csv data in rust
// -*- compile-command: "cargo build ; cargo run ../../sample.csv" -*-
// This is a comment, and will be ignored by the compiler
// You can test this code by clicking the "Run" button over there ->
// or if prefer to use your keyboard, you can use the "Ctrl + Enter" shortcut
// This code is editable, feel free to hack it!
// You can always return to the original code by clicking the "Reset" button ->
use std::env;
use std::thread;
@cedricpinson
cedricpinson / parser.md
Last active February 13, 2018 13:30
parsing csv data in different languages
@cedricpinson
cedricpinson / parser.py
Created February 13, 2018 13:19
Parse csv data in python
#!/usr/local/bin/python
import json
import sys
import time
material_specular_metalness = 0
material_albedo_diffuse = 0
material_specular_metalness_off = 0
def process_line(line):
{
"config": [
{
"default": "#64584F",
"material": "paint",
"name": "Paint",
"options": [
{
"color": "#64584F",
"name": "Brown"
@cedricpinson
cedricpinson / HandleList.h
Created March 25, 2019 15:53
Testing Handle List
template <Typename T, int count>
struct HandleList
{
HandleList(void* data)
{
_data = static_cast<T*>(data);
for ( int i = 0 ; i < count; i++ )
_freeSpots[i] = i;
_freeSpotCount = count;
on  HEAD [$?] in dope/build-debug-mt took 18s 126ms ➜ ./test/renderPerformance/renderPerformanceTestMT
date time ( uptime ) [ thread name/id ] file:line v|
2019-06-13 20:03:49.708 ( 0.000s) [main thread ] loguru.cpp:592 INFO| arguments: ./test/renderPerformance/renderPerformanceTestMT
2019-06-13 20:03:49.709 ( 0.000s) [main thread ] loguru.cpp:595 INFO| Current dir: /Users/trigrou/dev/dope/build-debug-mt
2019-06-13 20:03:49.709 ( 0.000s) [main thread ] loguru.cpp:597 INFO| stderr verbosity: 0
2019-06-13 20:03:49.709 ( 0.000s) [main thread ] loguru.cpp:598 INFO| -----------------------------------
2019-06-13 20:03:49.709 ( 0.000s) [main thread ] entry.cpp:82 INFO| [dope] main
2019-06-13 20:03:49.709 ( 0.000s) [main thread ] entry.cpp:84 INFO| [dope] args(0) -> ./test/renderPerformance/renderPerformanceTestMT