Skip to content

Instantly share code, notes, and snippets.

View xcarpentier's full-sized avatar
🛫
Remote!

Xavier Carpentier xcarpentier

🛫
Remote!
View GitHub Profile
@xcarpentier
xcarpentier / startup-noob-guide.md
Created April 29, 2016 07:49 — forked from adrienjoly/startup-noob-guide.md
Tips and resources on how to test, develop your startup idea, or find a developer/associate/CTO
@xcarpentier
xcarpentier / fibonacci-generator.js
Created June 16, 2016 13:20 — forked from jfairbank/fibonacci-generator.js
Fibonacci ES6 Generator
function *fibonacci(n) {
const infinite = !n && n !== 0;
let current = 0;
let next = 1;
while (infinite || n--) {
yield current;
[current, next] = [next, current + next];
}
}
// This gist explains how to setup scalable Parse LiveQuery server on Heroku
// Because there is one and only 'web' process on Heroku, it will divide into two Heroku apps: Main and LiveQuery.
// A: Main app - All features except for LiveQuery server
// Step A1. Setup a Parse app on Heroku
// Step A2. Add a Heroku Redis (free plan is enough for testing)
// Step A3. Configure Parse app, add redisURL for liveQuery
var api = new ParseServer({
...
liveQuery: {
@xcarpentier
xcarpentier / react-native-gifted-chat+0.9.11.patch
Created January 3, 2020 08:50 — forked from GollyJer/react-native-gifted-chat+0.9.11.patch
Patch react-native-gifted-chat to eliminate need for sizing code. Allows the chat data to stay cached.
diff --git a/node_modules/react-native-gifted-chat/lib/GiftedChat.js b/node_modules/react-native-gifted-chat/lib/GiftedChat.js
index 7f3f4b5..78ea7a1 100644
--- a/node_modules/react-native-gifted-chat/lib/GiftedChat.js
+++ b/node_modules/react-native-gifted-chat/lib/GiftedChat.js
@@ -1,6 +1,13 @@
import PropTypes from 'prop-types';
import React from 'react';
-import { Animated, Platform, StyleSheet, View, SafeAreaView, } from 'react-native';
+import {
+ Animated,
@xcarpentier
xcarpentier / firebase-hook.ts
Created January 17, 2020 10:48 — forked from 73nko/firebase-hook.js
React Hooks for loading Firebase Data
import React, { useReducer, useEffect, useRef } from 'react';
import firebase from 'firebase/app';
import equal from 'deep-equal';
function filterKeys(raw, allowed) {
if (!raw) {
return raw;
}
let s = new Set(allowed);
return Object.keys(raw)
@xcarpentier
xcarpentier / rodin.md
Created April 2, 2026 20:55 — forked from bdebon/rodin.md
Rodin – Interlocuteur socratique pour discussions sociétales profondes — anti-chambre d'écho
name rodin
description Interlocuteur socratique pour discussions sociétales profondes — anti-chambre d'écho

Tu es Rodin, un interlocuteur intellectuel exigeant. Tu incarnes ce rôle pour toute la durée de la conversation. Ne brise jamais le personnage.

Activation

  1. Lis et intègre la synthèse portrait du portrait de l'utilisateur : [OPTIONEL A FAIRE DE VOTRE COTÉ] — c'est ton contexte permanent sur ton interlocuteur. Ne la résume pas, ne la mentionne pas. Intègre-la silencieusement.