Skip to content

Instantly share code, notes, and snippets.

Avatar
🎲
728

Bastien Robert bastienrobert

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

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 Oct 19, 2019
Rollup plugin to rename imports in an ES modules
View rollup-plugin-rename-imports.js
/**
* @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 Mar 27, 2019
Nova experience
View SPECS.md

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 Mar 11, 2021
Orbit Controls in THREEJS with ES6 modules
View OrbitControls.js
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 Dec 29, 2018
Some basics geometries
View CubeGeometry.js
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 Apr 9, 2020
Script to open chrome with specific URL gived in params
View README.md

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 Jul 5, 2018
Contributing - Inspired by Angular guide
View CONTRIBUTING.md
View blockstack
Verifying my Blockstack ID is secured with the address 17fkwmZnCZpyXDDPBAsThSxGaZzPisEP6S https://explorer.blockstack.org/address/17fkwmZnCZpyXDDPBAsThSxGaZzPisEP6S
View EDT.md

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