Skip to content

Instantly share code, notes, and snippets.

View thom4parisot's full-sized avatar

Thomas Parisot thom4parisot

View GitHub Profile
class Invoker {
invoke() {
return Invoker.convertFromStdin()
}
static async convertFromStdin() {
console.log('>>> convertFromStdin')
const data = await Invoker.readFromStdin()
console.log('<<< convertFromStdin', data)
}
@thom4parisot
thom4parisot / after-fonctionnel.js
Last active May 20, 2018 12:40
loops-refactoring
const variables = []
function isDuplicate(program, index, programs) {
return programs.slice(i+1).contains(p => {
return p.program.genrePressCode !== program.program.genrePresseCode
})
}
function mapProgram({language, idChannel}) {
return (program) => ({
// 'use strict';
a = 32
printA()
function printA() {
console.log(a)
}
a = 64

Keybase proof

I hereby claim:

  • I am oncletom on github.
  • I am oncletom (https://keybase.io/oncletom) on keybase.
  • I have a public key ASDuZSGubIkd5hTeiDzH25-afDvVZ28OOyGUAR2v_Zo-mgo

To claim this, I am signing this object:

@thom4parisot
thom4parisot / README.md
Last active September 21, 2016 10:54
Moving github.com/bbcrd to github.com/bbc

Install

git clone https://gist.github.com/2c78ec6e6de6a243ef32ec4a70e35a8b.git /tmp/mv


# cd into the git repo you want to migrate
sh /tmp/mv/run.sh
@thom4parisot
thom4parisot / README.md
Created September 17, 2016 10:38
electron#7217 FATAL:audio_manager_base.cc

FATAL:audio_manager_base.cc

nvm use v6
npm install
npm run electron

Should terminate after running with the following error:

@thom4parisot
thom4parisot / MyAngularCtrl.js
Last active April 19, 2016 11:22 — forked from fcamblor/DataLoader.js
Resolving promise multiple times
'use strict';
angular.module('voxxrin')
.controller('PresentationsCtrl', function ($scope, $stateParams, SharedData) {
Promise.all(SharedData.loadPresentationsForEventPromises($stateParams.eventId)).then(function(presentations){
$scope.presentations = presentations;
});
});
@thom4parisot
thom4parisot / index.js
Created January 29, 2016 16:26
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var d3 = require('d3');
var geoJSONUrl = 'https://cdn.rawgit.com/gregoiredavid/france-geojson/master/regions.geojson';
var path = d3.geo.path();
var svg = d3.select("body").append("svg")
.attr("width", 960)
@thom4parisot
thom4parisot / post.md
Last active January 27, 2016 10:25
Apple TV - Sample App

Running the NativeScript Runtime for iOS on Apple TV

Last week Apple announced amongst many new things an update to Apple TV. It now runs on a new operating system named tvOS and includes an app store allowing third-party apps. These apps can be developed using many frameworks and concepts quite familiar to the iOS ones (Foundation, UIKit and CoreGraphics), but also includes some new APIs like TVServices.

We were eager to find out if it was possible to run NativeScript on this new device.

Building the NativeScript Runtime for tvOS

The NativeScript runtime for iOS uses CMake to ease the build configuration process. All we had to do in order to make our build (which includes the JavaScriptCore engine) Apple TV compatible, was to add two more platforms in our config scripts:

set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimul
@thom4parisot
thom4parisot / README.md
Created December 11, 2015 20:57
babel + jsx + virtual-dom
nvm use 4

npm run build
node main.js