Skip to content

Instantly share code, notes, and snippets.

View fcamblor's full-sized avatar

Frédéric Camblor fcamblor

View GitHub Profile
@fcamblor
fcamblor / devoxxfr2018-specials.json
Created April 17, 2018 17:32
devoxxfr2018-specials.json
{
"slots": [{
"roomId": "startups",
"notAllocated": false,
"fromTimeMillis": 1524036600000,
"toTimeMillis": 1524047400000,
"break": null,
"roomSetup": "classroom",
"roomName": "Village des startups",
"talk": {
@fcamblor
fcamblor / README.md
Last active August 17, 2022 07:59
debug-requirejs-loading.js

Simply include debug-requirejs-loading.js script before starting your requirejs dependencies :

<script src="scripts/require.js"></script>
<script src="path/to/debug-requirejs-loading.js"></script>
<script type="text/javascript">
require(['data/main'], function(){ console.log("requirejs started !"); });
</script>

It will show :

@fcamblor
fcamblor / restx-raw-type-list.txt
Last active February 21, 2018 09:53
RestX "raw" types list
For an upcoming RestX feature (see https://github.com/restx/restx/issues/146)), we need to identify what are the common "raw types" you are using on your projects.
A "raw type" has generally following properties :
- it allows to represent a "single" value
- it should be deserializable from a single string value
- it should be serializable to a single string value
- instance is generally immutable
Here are the current listing of identified types :
@fcamblor
fcamblor / createCFPManualVote-bookmarklet.js
Last active January 23, 2018 07:43
DevoxxFR CFP UI goodness to facilitate massive vote updates as a GoldenTicket
javascript:function createManualVoteFields(){$("#tableMyVotes tr").each((a,b)=>{$(b).find("td:eq(0)").append($("<input type='number' class='manualVote' size='1' style='width: 35px' />"))}),$("h3:eq(1)").append("&nbsp;&nbsp;<button class=\"btn btn-sm btn-primary\" onclick=\"submitManualVotes()\">Submit manual votes</button>")}function getVotes(){return $("#tableMyVotes tr").map((a,b)=>{return{id:$(b).find("td:eq(1) a").text(),score:+$(b).find("td:eq(0) button:eq(0)").text(),newScore:+$(b).find("td:eq(0) :input.manualVote").val(),title:$(b).find("td:eq(2)").text().trim(),track:$(b).find("td:eq(3)").text().trim()}}).filter((a,b)=>b.id)}function showCurrentVotesStats(){var a=getVotes(),b={votesPerScore:{},votesPerTrackThenScore:{},votesPerTrack:{}};$.each(a,function(d,e){b.votesPerScore[e.score]=b.votesPerScore[e.score]||[],b.votesPerTrack[e.track]=b.votesPerTrack[e.track]||[],b.votesPerTrackThenScore[e.track]=b.votesPerTrackThenScore[e.track]||{},b.votesPerTrackThenScore[e.track][e.score]=b.votesPerTrackThenSco
@fcamblor
fcamblor / background.png
Last active November 8, 2017 11:59
4sh_loterie
background.png
@fcamblor
fcamblor / first-restx-release.md
Last active December 21, 2017 08:09
First maven restx release on maven central

Create a keybase.io account

Download keybase.io public key by clicking on your profile page and on the key

Paste public key content in /tmp/keybase-public.key

You can publish it as well on http://pgp.mit.edu/ (not sure if this step is mandatory or not .. I did it so cannot check if without it it doesn't work :-))

Download keybase.io private key by clicking on your profile page and on the "edit" link

Paste private key content in /tmp/keybase-private.key

@fcamblor
fcamblor / Resources.md
Last active October 13, 2017 08:14
Et si votre backend était une Google Spreadsheet ?

URL pour accéder au contenu JSON d'une Spreadsheet : http://bit.ly/gs-json-url
Enlever la callback pour récupérer du JSON brut (sans JSONP)

============

Créer un menu déroulant additionnel dans la Spreadsheet :

function onOpen() {
  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
@fcamblor
fcamblor / changeOSXScreenCaptureLocation.sh
Created September 7, 2016 10:26
Change OS X Screen capture location
# It could fit in a tweet ... except that twitter considers com.apple..... is an url and is putting extra info in the
# tweet making it longer than 140 chars -_-'
# Note that your target directory must exist prior to setting the config option
# And I `killall SystemUIServer` in order to have config option taken into consideration immediately
mkdir "$HOME/Captures" && defaults write com.apple.screencapture location -string "$HOME/Captures" && killall SystemUIServer
@fcamblor
fcamblor / pokemon-names.json
Last active July 29, 2016 01:39
List of pokemon names in different languages. You can use it this way : pokemon[25].names.fr
[ null, {
"id" : 1,
"names" : {
"de" : "Bisasam",
"en" : "Bulbasaur",
"es" : "Bulbasaur",
"fr" : "Bulbizarre",
"it" : "Bulbasaur",
"ja" : "フシギダネ",
"ko" : "이상해씨",
@fcamblor
fcamblor / DataLoader.js
Last active May 25, 2021 19:14
Resolving promise multiple times
/**
* Utility class allowing to load data from 3 levels :
* - Remote server
* - Browser's Local storage
* - In memory cache
*
* It provides a loadEventsThen(dataAvailableCallback) method which will trigger
* dataAvailableCallback once data will be retrieved at some point
* The first time it is called, in-memory cache will be empty (thus, callback will never be called on it)
*/