| Nom | Qté | | | | |
|---------|-----------|------| | | |
| sucreGla| 60g | 105 | 92 | 265 | 220 |culdepoule1
| pamande | 30g | 53 | 41 | 118 | 98 |culdepoule1
| farine | 20g | 35 | 27 | 78 | 65 |culdepoule1
| beurre | 50g | 87 | 76 | 220 | 183 |casserole1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const log = true; // comming from logging service (dont log in prod) | |
// | |
type Deprecation = { | |
what: string; | |
because: string; | |
recommendation: string; | |
adr_link: string; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zx | |
// you need zx installed | |
// run with `zx smoketest.mjs` | |
const BASEURL = 'http://localhost:3000'; | |
const COMMON = [ | |
'header', | |
'footer', | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sharedStates = { | |
initial: 'pending', | |
states: { | |
pending: { | |
on: { | |
'': { | |
target: 'active', | |
cond: 'isActivated' | |
}, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sharedStates = { | |
initial: 'pending', | |
states: { | |
pending: { | |
on: { | |
ACTIVATE: 'active', | |
} | |
}, | |
active: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const campaignStateMachine = Machine({ | |
id: 'Campaign state', | |
initial: 'draft', | |
guards: { | |
beforeActivation: (c,e) => false, | |
inActivation: (c,e) => true, | |
afterDeactivation: (c,e) => false, | |
}, | |
states: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetchMachine = Machine({ | |
id: 'report', | |
initial: 'idle', | |
context: { | |
answers: 0, | |
}, | |
states: { | |
idle: { | |
on: { | |
CREATE_REPORT: 'filled' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var REPO = 'githubUsername/repoName'; | |
var TOKEN = 'token'; | |
getCircleStatus(TOKEN, REPO); | |
function getCircleStatus() { | |
var endpoint = 'project/' + REPO; | |
httpGetAsync(endpoint, printStatus) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Nice alias for youtube-dl for downloading mp3 from youtube | |
# and other media services, parse the title and the thumbnail | |
# to add the adequate metadatas. | |
# You need to provide a youtube id. | |
# > ytmp3 venrUQLZ87M | |
# or | |
# > ytmp3 https://www.youtube.com/watch?v=venrUQLZ87M | |
# It works with playlists too ! | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//count($0); for counting watchers on the selected dom element | |
//count($0, true); for counting watchers on the selected dom element + childrens | |
function count(el, recurs) { | |
var root = $(el); | |
var watchers = []; | |
var f = function (element) { | |
if (element.data().hasOwnProperty('$scope')) { | |
angular.forEach(element.data().$scope.$$watchers, function (watcher) { | |
watchers.push(watcher); |
NewerOlder