Skip to content

Instantly share code, notes, and snippets.

View xcarpentier's full-sized avatar
🌐
Remote!

Xavier Carpentier xcarpentier

🌐
Remote!
View GitHub Profile
@mnylen
mnylen / gist:8c4010ab353f4886f89c
Last active March 12, 2021 16:33
Using the new Safari View Controller from React Native application

Using the new Safari View Controller from React Native application

  • Safari View Controller is iOS 9 only. You need Xcode 7 (beta 2 currently) to use it

  • React Native 0.6.0 is the minimum I got this working on

You might need to add this to your Info.plist in order for iOS 9 to load your application correctly:

<key>NSAppTransportSecurity</key>
@jonathanpath
jonathanpath / gulpfile.js
Last active June 24, 2016 08:54
Gulpfile sass + livereload + autoprefixer
'use strict';
var gulp = require('gulp'),
sass = require('gulp-sass'),
livereload = require('gulp-livereload'),
autoprefixer = require('gulp-autoprefixer');
livereload({ start: true });
gulp.task('sass', function () {
@Manoz
Manoz / Emoji Cheat Sheet.json
Created November 24, 2015 17:29
Emoji Cheat Sheet JSON
{
"People": [
":bowtie:",
":smile:",
":laughing:",
":blush:",
":smiley:",
":relaxed:",
":smirk:",
":heart_eyes:",
/**
* Based on
* https://github.com/donnut/typescript-ramda
* with the help of the typescript-converter from
* [email protected]:ptmt/flow-declarations.git
*/
declare module 'ramda' {
declare type placeholder = {}
declare type ListIterator<T, TResult> = {
(value: T, index: number, list: T[]): TResult;
@adrienjoly
adrienjoly / Usage-Trello.md
Last active February 7, 2025 18:09
Usage de Trello dans un projet de développement Agile #team #process #workflow

Usage de Trello dans un projet de développement Agile

Ce document est inspiré des pratiques de UserVoice, décrites dans How We Use Trello & Google Docs to Make UserVoice Better Every Day, et affinées par moi-même au fur et à mesure des projets.

Objectifs de l'usage de Trello

  • Définir, prioriser et suivre l'avancement des taches du sprint en cours
  • Noter les décisions et conclusions liées à chaque tache, afin de pouvoir les retrouver plus tard (historique au besoin)
  • Partager avec l'équipe la charge estimée et réelle de chaque tache (time-tracking), utile pour la facturation
@cmcewen
cmcewen / upload.js
Created December 29, 2015 15:38
Upload image from React Native to Cloudinary
var CryptoJS = require('crypto-js');
function uploadImage(uri) {
let timestamp = (Date.now() / 1000 | 0).toString();
let api_key = 'your api key'
let api_secret = 'your api secret'
let cloud = 'your cloud name'
let hash_string = 'timestamp=' + timestamp + api_secret
let signature = CryptoJS.SHA1(hash_string).toString();
let upload_url = 'https://api.cloudinary.com/v1_1/' + cloud + '/image/upload'
@sibelius
sibelius / Codemod RN24 to RN25.md
Last active November 9, 2016 13:09
Codemod React Native 24 imports to RN25 imports

README

Why this transform is necessary?

Until React Native 24, you import React from 'react-native' package, but this will change on RN 25, you will need to import React from 'react'. You probably have many files that does this, so I've created a codemod to save you a bunch of time

How to use this

  • Install jscodeshif
@davimacedo
davimacedo / curl.sh
Last active June 23, 2021 21:33
Example of importing data with cloud functions. See a live example at https://www.back4app.com/database/davimacedo/parse-import-example
curl -X POST \
-H "X-Parse-Application-Id: LL9oIdzIkmwl5xyowQQu0fTmXyUWfet9RuAzwHfj" \
-H "X-Parse-REST-API-Key: R3S8PYQKuzeV4c8MUeO5ved46C50MEp56boDHW1O" \
-H "Content-Type: application/json" \
-d @data.json \
https://parseapi.back4app.com/functions/import
@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];
}
}
defmodule WisecashEx.AuthenticationTest do
use WisecashEx.IntegrationCase
setup do
%WisecashEx.User{email: "[email protected]"}
|> WisecashEx.User.auth_changeset(%{password: "testtest"})
|> Repo.insert!
:ok
end