Skip to content

Instantly share code, notes, and snippets.

View chollier's full-sized avatar

Loic CHOLLIER chollier

View GitHub Profile
Privacy Policy – Meta Cleaner
Effective Date: 6/12/2025
Meta Cleaner (“we”, “our”, or “us”) is committed to protecting your privacy. This Privacy Policy explains how our app collects, uses, and protects your data.
1. No Personal Account Required
We do not require you to create an account or provide any personal identifying information to use Meta Cleaner. The app operates entirely on your device.
type Avatar {
# The original avatar URL
originalUrl: String @fake(type:avatarUrl, options: { imageCategory: people })
# The thumbnail resized to 64x64px
- thumbnail64Url: String @fake(type:imageUrl, options: { imageWidth: 64, imageHeight: 64, randomizeImageUrl: true })
+ thumbnail64Url: String @examples(values: ["http://example.com/image.jpg", "http://example.com/image2.jpg"])
}
loic@Loics-MacBook-Pro-32  ~/persistgraphql   master  npm run compile
> [email protected] compile /Users/loic/persistgraphql
> tsc
node_modules/@types/isomorphic-fetch/index.d.ts(23,14): error TS2300: Duplicate identifier 'BodyInit'.
node_modules/@types/isomorphic-fetch/index.d.ts(24,14): error TS2300: Duplicate identifier 'RequestInfo'.
node_modules/@types/isomorphic-fetch/index.d.ts(28,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'headers' must be of type 'any', but here has type 'string[] | Headers| { [index: string]: string; }'.
node_modules/@types/isomorphic-fetch/index.d.ts(30,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'mode' must be of type 'string', but here has type 'string | RequestMode'.
node_modules/@types/isomorphic-fetch/index.d.ts(31,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'credentials' must be of type 'string', but here has type 'string | RequestCredential
# Save dyno formation state
heroku ps:scale > mydynoformation
# Scale dynos to 0
heroku ps:scale $(heroku ps:scale | sed -E 's/=([0-9]+):/=0:/g')
# Scale dynos back to their original state
heroku ps:scale `cat mydynoformation`
@chollier
chollier / pre-commit eslint
Last active February 25, 2016 23:18
Pre-commit ESLINT hook using npm's binary
#!/bin/sh
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".js\{0,1\}$")
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true
@chollier
chollier / gist:0a7c8365ff904b634b0f
Created March 26, 2015 19:14
TipsCalculator React Native
/**
* Copyright 2004-present Facebook. All Rights Reserved.
*
* @providesModule TipsCalculatorApp
* @flow
*/
'use strict';
var React = require('react-native');
var {
@chollier
chollier / gist:f53afc91544cff3c1e51
Created January 29, 2015 22:28
Immutable.js sorting
myMap is something like "OrderedMap { 3636: Map { stop: "2015-01-29T22:00:00.000-08:00", }, 3637: Map { stop: "2015-01-31T22:00:00.000-08:00", ... } }"
myMap.sort(function(a, b) {
if (moment(a.get('stop_at')).unix() > moment(b.get('stop_at')).unix()) {
return 1;
} else if (moment(a.get('stop_at')).toDate() < moment(b.get('stop_at')).toDate()) {
return -1;
} else {
return 0;
}
# Dans app.coffee :
# du coup tu peux push des custom la dedans
validators = require('react-form-builder').Validators
_.each validators, (value, key) ->
window.validators[key] = new value()
# form definition
{
@chollier
chollier / gist:97e79d85d855fbf460c0
Created July 31, 2014 19:31
setState callback not called
loadResource: (stateName, callback) ->
@abortRequest(stateName)
console.log "c"
@setState loading: true, =>
console.log "log here"
@QQAdmin.module "Entities", (Entities, App, Backbone, Marionette, $, _) ->
class Entities.Person extends Entities.Model