Skip to content

Instantly share code, notes, and snippets.

View Tom32i's full-sized avatar

Thomas Jarrand Tom32i

View GitHub Profile
@Tom32i
Tom32i / afup-CFP-mean.js
Created May 30, 2023 12:34
Get mean notation on your AFUP CFP submission
(document.body.querySelectorAll('.star.is-selected').length/document.body.querySelectorAll('.star').length)*5;
@Tom32i
Tom32i / astuces_rando_velo.md
Created July 30, 2020 11:31
Astuces rando vélo

La rando

  • Faites vous plaisir, arrêtez vous quand vous êtes fatigués, ne forcez pas.
  • Restez ouverts à l'imprévu, ne planifiez pas trop : il y a des campings et des gares partout, des fois ça roule bien, dès fois y'a un super spot et on a envie de s'arrêter à 15h et de passer le reste de l'aprem dans la piscine. Vous finirez peut être une gare plus tôt ou une gare plus tard que ce que vous aviez prévu :)
  • Comptez entre 60 et 80km par jour suivant comment ça roule. Vous ferrez sans soucis entre 350 et 450km en 6 jours (si tu veux avoir une idée de quelle ville est envisageable depuis votre point de départ).

Le matos

  • Prenez un petit kit crevaison (ou éventuellement une chambre à air de rechange) histoire de pas être coincé en pleine cambrousse.
  • La bouffe se gère facilement au jour le jour, petit commerce, boulangerie, marchés ... pas un soucis.
  • Au moins 2 sacoches chacun et un tendeur pour ficeler ce qui depasse.
  • 1 tenue pour rouler / 1 tenue confort pour le soir suffisent, ne vous
@Tom32i
Tom32i / README.md
Last active August 17, 2017 12:27
I18n JS

Installation

npm install i18n-js

Usage

Import just translations.js once in your main file, then use I18n everywhere.

Curvytron events

Events are JSON arrays, sent through websocket connexion, following that format:

[name, data, callbackID]

Get client ID

[["whoami",null,0]]
<!DOCTYPE html>
<html>
<head>
<title>Okeanos Explorer 2016 Livestream</title>
<style>
body, * {
margin: 0;
padding: 0;
font-size: 0;
background: #000000;
@Tom32i
Tom32i / CFP.md
Last active February 15, 2016 20:01
CFP 2016
@Tom32i
Tom32i / Pocky.php
Last active February 4, 2016 15:04
Lazy Pocky
<?php
namespace Lazy;
class Pocky
{
private function __construct()
{
dump("Lazy Pocky");
}
@Tom32i
Tom32i / SERVE.md
Last active January 29, 2016 10:03
Quickly serve a local directory with PHP built-in server.

Quickly serve a local directory

php -S localhost:8000

You directory is accessible on: http://localhost:8000

Create an alias for it

In ~/.bashrc add:

@Tom32i
Tom32i / Car.js
Created January 15, 2016 14:46
Faut-il nommer les "méthodes" des prototypes ?
function Car (color)
{
this.color = color;
}
// Fonction anonyme?
Car.prototype.getColor = function()
{
return this.color;
};
@Tom32i
Tom32i / Inventory.php
Created January 15, 2016 07:20
Doctrine Event Inventory
<?php
namespace EventBundle\Utils;
/**
* Inventory
*/
class Inventory
{
/**