Skip to content

Instantly share code, notes, and snippets.

View thibaudgg's full-sized avatar

Thibaud Guillaume-Gentil thibaudgg

View GitHub Profile
@thibaudgg
thibaudgg / cloudSettings
Last active September 1, 2021 12:28
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-09-01T12:28:17.084Z","extensionVersion":"v3.4.3"}
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@thibaudgg
thibaudgg / totp.rb
Last active October 24, 2017 09:04
class TOTP
attr_reader :secret, :digits, :digest, :interval
DEFAULT_INTERVAL = 30
DEFAULT_DIGITS = 6
# @param [String] secret in the form of base32
# @option options [Integer] interval (30) the time interval in seconds for OTP
# This defaults to 30 which is standard.
# @option options digits [Integer] (6)
@thibaudgg
thibaudgg / exam.md
Last active June 16, 2017 09:08
Exam / MAS-RAD / Ruby on Rails / 2017

Exam / MAS-RAD / Ruby on Rails / 2017

Étudiant: VOTRE_NOM_ET_PRENOM

Marche à suivre

  1. Télécharger cette donnée sur votre ordinateur.
  2. Éditer le fichier exam.md avec vos réponses (Nom+Prénon, 4 Questions et 3 exercises).
  3. Envoyer votre fichier à thibaud@thibaud.gg.
@thibaudgg
thibaudgg / tutorial.md
Last active June 9, 2017 07:05
Rails Testing - Initiation

Rails Testing - Initiation

Prerequisites

  • Clone the Cloud9 thibaudgg/rails-weblog-2 workspace. Go to https://c9.io/new/clone and then choose the MAS-RAD / Ruby on Rails team, click on the "Clone workspace" tab, then choose the thibaudgg/rails-weblog-2 workspace.
  • Ensure that PostgreSQL is still running with: sudo service postgresql start
  • Setup the TEST database with: rails db:setup RAILS_ENV=test (this will create and migrate the weblog_test database)
  • Ensure that all tests are running with rails test and rails test:system or both in one shot with rails test test.
@thibaudgg
thibaudgg / tutorial.md
Last active January 23, 2023 05:38
Rails Authentication from Scratch - Step by Step

Rails Authentication from Scratch - Step by Step

Prerequisites

  • Clone the Cloud9 thibaudgg/rails-weblog workspace. Go to https://c9.io/new/clone and then choose the "MAS-RAD / Ruby on Rails" team, click on the "Clone workspace" tab, then choose the "thibaudgg/rails-weblog" workspace.
  • Seed the database, this will create some posts and comments (see db/seeds.rb):
rails db:seed
@thibaudgg
thibaudgg / cloud9-setup.sh
Last active June 8, 2020 00:15
Rails 5: The Tour - Step by Step
#!/bin/sh
# Clean workspace
rm -rf *
rm .gitignore
# Upgrade Ruby
rvm install ruby-2.4.1 --default
# Start PostgreSQL and fix encoding conflict when creating database
@thibaudgg
thibaudgg / onename
Created March 30, 2016 06:55
Onename proof
Verifying that +thibaudgg is my blockchain ID. https://onename.com/thibaudgg
POST /oauth/token HTTP/1.1
Content-Type: application/json

{
  "grant_type": "password",
  "client_id": "CLIENT_ID",
  "owner_type": "OWNER_TYPE",
  "username": "OWNER_EMAIL",
 "password": "OWNER_PASSWORD"
@thibaudgg
thibaudgg / gist:6713b377c1c901677101
Created December 5, 2014 08:01
Keybase.io verification
-----BEGIN PGP MESSAGE-----
Comment: GPGTools - https://gpgtools.org
owF9Ul9sFEUcvqsCpQQkgcIDJm1WbYTUc2ZnZmenjQmkp4hKKFCMGMI5Mzt7XY7b
vdvdHhQoASUoorXBhP8ECBoh8QETQkhIikQxxgMegJQ/EXmA8McIhRdiSozOXjCi
D87TzPy+75vf9/tmYPxTqYZ0qYsUj6Y7Qbp6R6S61rsvrjZE4PQabasNudxTfpzs
fF5URptRUL2CRyrjBc1+4KjMsqj5MabVqKgw8gJfo0CGZpDR15rAE7Lr+XkVlkIv
0TIoJg7BipsQuYACB0jLVNxFlGFoE0mZJFzaNteS3UEU/+tVo6aZ85xEp4bvoKyD
zOqw7Vm61lMrQBdDxjhHhLkEWFJwAKTCAlOHIwhAAoxU+NhS3O0J3uPk80nDRRUW
lqtcGAQ11zL2EgzEkFLLwgjplnjUrVmMME4hlQgjbDKHQWC6li0Bcm1uY8u1iGm6