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 / .htaccess
Last active October 31, 2017 13:35
Add password on your Apache server
AuthName "Secured page"
AuthType Basic
AuthUserFile "/var/www/.htpasswd"
Require valid-user
@bastienrobert
bastienrobert / slug_helper.rb
Created November 3, 2017 16:33
Old TradFood slug helper (text parametized)
module SlugHelper
def slugify(text)
return text.parameterize
end
def unslugify(slug)
return slug.tr('-', ' ')
end
end
@bastienrobert
bastienrobert / .htaccess
Created November 29, 2017 14:32
Remove .html from HTACCESS
#example.com/page will display the contents of example.com/page.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)$ $1.html [L,QSA]
#301 from example.com/page.html to example.com/page
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*\.html\ HTTP/
RewriteRule ^(.*)\.html$ /$1 [R=301,L]

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
Verifying my Blockstack ID is secured with the address 17fkwmZnCZpyXDDPBAsThSxGaZzPisEP6S https://explorer.blockstack.org/address/17fkwmZnCZpyXDDPBAsThSxGaZzPisEP6S
@bastienrobert
bastienrobert / CONTRIBUTING.md
Created July 5, 2018 23:52
Contributing - Inspired by Angular guide
@bastienrobert
bastienrobert / README.md
Last active April 29, 2024 03:24
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 / 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 / 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 / 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: