Skip to content

Instantly share code, notes, and snippets.

View bastienrobert's full-sized avatar
🎲
728

Bastien Robert bastienrobert

🎲
728
View GitHub Profile
@bastienrobert
bastienrobert / spinner.svg
Created February 21, 2020 09:12 — forked from juliendargelos/spinner.svg
Basic animated svg spinner
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

js bitwise cheat sheet

var INIT = 0x1      // 0 0 0 0 1
  , PENDING = 0x2   // 0 0 0 1 0
  , DONE = 0x4      // 0 0 1 0 0
  , ERROR = 0x8     // 0 1 0 0 0
  , SUCCESS = 0x10  // 1 0 0 0 0
  , ALL = 0x1f      // 1 1 1 1 1
@bastienrobert
bastienrobert / rollup-plugin-rename-imports.js
Created October 19, 2019 10:59
Rollup plugin to rename imports in an ES modules
/**
* @example
* // rename 'preact' as 'https://cdn.pika.dev/preact/^8.5.2'
* // and set 'https://cdn.pika.dev/preact/^8.5.2' as external
* renameImports({ 'preact': 'https://cdn.pika.dev/preact/^8.5.2' })
*/
export default function renameImports(packages = {}) {
return {
name: 'rename-imports',
transform(code) {
@bastienrobert
bastienrobert / SPECS.md
Last active March 27, 2019 15:03
Nova experience

Nova

Nova est une expérience web utilisant React et THREE.JS.

Le but de cette expérience est de proposer à l’utilisateur de concevoir sa vision de la beauté à travers la création d’une planète en fonction des choix et des interactions qu’il découvrira tout au long d’un récit, raconté par un enfant narrateur.

Afin de rendre Nova facilement accessible et à la portée de tous, le choix d’un support web desktop est venu naturellement face au nombre et au moyen d’interagir avec l’expérience.

Introduction:

@bastienrobert
bastienrobert / OrbitControls.js
Last active March 11, 2021 17:10
Orbit Controls in THREEJS with ES6 modules
import * as THREE from 'three';
// Disable ESLINT for this page
/* eslint-disable */
/**
* @author qiao / https://github.com/qiao
* @author mrdoob / http://mrdoob.com
* @author alteredq / http://alteredqualia.com/
* @author WestLangley / http://github.com/WestLangley
@bastienrobert
bastienrobert / CubeGeometry.js
Created December 29, 2018 11:29
Some basics geometries
const vertices = [
// x, y, z
// FRONT
1.0, 1.0, 1.0,
-1.0, 1.0, 1.0,
-1.0, -1.0, 1.0,
1.0, -1.0, 1.0,
// RIGHT
1.0, 1.0, -1.0,
1.0, 1.0, 1.0,
@bastienrobert
bastienrobert / README.md
Last active April 9, 2020 10:22
Script to open chrome with specific URL gived in params

OpenChrome

Inspired by Create React App

This script is checking in every chrome window if there's a tab with the URL gived in params:

  • If there's one: It opens chrome in first-ground and show the good chrome window with the good tab
  • If there's multiples: Same behavior but it use the first tab found
  • If there's not: It launch chrome (if it's not open) and create a new tab with the given URL

How it works

osascript openChrome.scpt YOUR_FORMATTED_URL

@bastienrobert
bastienrobert / CONTRIBUTING.md
Created July 5, 2018 23:52
Contributing - Inspired by Angular guide
Verifying my Blockstack ID is secured with the address 17fkwmZnCZpyXDDPBAsThSxGaZzPisEP6S https://explorer.blockstack.org/address/17fkwmZnCZpyXDDPBAsThSxGaZzPisEP6S

EDT

Bored to get a paper planning, I always forgot. So this script (gonna be better soon) allows me to transform an array to a CSV, to import it on my Calendar.

TODO

  • Form (with HTML and custom style) to enter it
  • Managing TD, TP, LV2 & Modules
  • Beautify the code
  • Set in production
  • Ask for a Google Auth (optionnal) for automatic import