Skip to content

Instantly share code, notes, and snippets.

View lbdremy's full-sized avatar

Remy Loubradou lbdremy

View GitHub Profile
@lbdremy
lbdremy / machine.js
Last active September 15, 2021 16:36
Generated by XState Viz: https://xstate.js.org/viz
const operatorMachine = Machine({
id: 'operator',
initial: 'inactive',
states: {
inactive: {
on: {
SET_AS_VISIBLE: 'visible',
ONBOARD: 'onboarded'
}
@lbdremy
lbdremy / faq-oauth2.md
Last active January 10, 2022 01:48
FAQ OAuth2

FAQ OAuth2

When should you use the Authorization code flow with PKCE (Proof Key for Code Exchange) ?

TLDR: If you’re using the Authorization Code flow in a mobile app, Single page application, desktop app, or any other type of application that can’t store a client secret securely (i.e. the only place secure enough is your servers), then you should use the PKCE extension, which provides protections against other attacks where the authorization code may be intercepted and it does not require a client secret.

Keybase proof

I hereby claim:

  • I am lbdremy on github.
  • I am lbdremy (https://keybase.io/lbdremy) on keybase.
  • I have a public key ASBQSAZ2QVu0xp1SRQ3iZfCtDMLzCu3HqcKdYMopRGkyIAo

To claim this, I am signing this object:

@lbdremy
lbdremy / coverage.html
Created July 31, 2014 00:06
Test coverage solr-node-client
<!DOCTYPE html><html><head><title>Coverage</title><script>
headings = [];
onload = function(){
headings = document.querySelectorAll('h2');
};
onscroll = function(e){
var heading = find(window.scrollY);
@lbdremy
lbdremy / script.bash
Created May 7, 2014 14:13
Bash completion based on history
echo '"\e[A": history-search-backward "\e[B": history-search-forward set show-all-if-ambiguous on set completion-ignore-case on' > ~/.inputrc
@lbdremy
lbdremy / break-devtools.html
Last active August 29, 2015 13:56
Break DevTools console
<!DOCTYPE>
<html>
<script>
Object.defineProperty(console, '_commandLineAPI',
{ get : function() { throw 'Nooo!' } })
</script>
<html>
@lbdremy
lbdremy / sound-effect-cordova.md
Created February 5, 2014 19:33
Sound effect on tap in a Cordova application - (work in progress)
@lbdremy
lbdremy / promise-q-jquery
Created December 4, 2013 18:10
Play around with Q and jQuery.Deferred
http://plnkr.co/edit/HRb9KQLqOqQNxco2J9XM?p=preview
@lbdremy
lbdremy / when-aplus-test-adapter.js
Last active December 30, 2015 06:49
when adapter
var when = require('when');
exports.resolved = when.resolve;
exports.rejected = when.reject;
exports.deferred = when.defer;
@lbdremy
lbdremy / q-aplus-test-adapter.js
Last active December 30, 2015 06:48
Q adapter
var Q = require('q');
exports.resolved = Q.resolve;
exports.rejected = Q.reject;
exports.deferred = Q.defer;