Skip to content

Instantly share code, notes, and snippets.

View guillaumemorin's full-sized avatar
:octocat:
👨‍💻

Guillaume Morin guillaumemorin

:octocat:
👨‍💻
View GitHub Profile
@guillaumemorin
guillaumemorin / react-native-splashscreen-ios.md
Last active November 8, 2018 09:36
react-native-splashscreen-ios.md

in AppDelegate.m

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  // ...

 // 1. Load the LaunchScreen from the xib file
@guillaumemorin
guillaumemorin / react-native-easing.md
Created November 8, 2018 09:34
react-native-easing.md
'use strict';

var React = require('react-native');
var {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  Easing,
@guillaumemorin
guillaumemorin / gradle.md
Last active November 6, 2018 14:55
gradle.md
$ cd android && ./gradlew assembleRelease //Generate signed APK
$ cd android && ./gradlew clean //Clean Android project
$ cd android && ./gradlew app:dependencies // Display app dependencies 
$ cd android && ./gradlew app:dependencies --scan // --scan option generate a web-based, searchable dependency report
$cd android && ./gradlew cleanBuildCache

react-native link compatibility

add to Pofile

pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge',
    'DevSupport',
    # the following ones are the ones taken from "Libraries" in Xcode:
 'RCTAnimation',
@guillaumemorin
guillaumemorin / slite_instagram.md
Last active June 8, 2018 11:51
slite instagram

STEPS

Preliminary questions

  • Ask to UX/UI designer details and mockup about where he wants to put this button on and how this will be displayed (this will help to know what technical prerequires you have to carry on ... I'm thinking about animations or particular behavior etc ...)
  • List all app screeens where this feature will be displayed.
  • Define button behavior on toggle : Does click need to toggle status instantly on app side and made the API call after or does we need to wait for API return to update the buttton status.
  • Should it be working offline ?
  • Does Like counter need to be updated in real time ?
@guillaumemorin
guillaumemorin / SSR.md
Created May 15, 2018 13:49
Server Side Rendering

Server Side Rendering (SSR)

Definition

Server side rendering allows to generated initial content on the server, so browser can download a page with HTML content already in place. (instead of filling content thru JavaScript with Client Side Rendering)

Pros

@guillaumemorin
guillaumemorin / react native cloudinary upload.md
Last active April 4, 2017 13:05
react native cloudinary upload
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'
@guillaumemorin
guillaumemorin / server.js
Created May 25, 2012 15:02 — forked from jeffrafter/server.js
Twitter OAuth with node-oauth for node.js+express
var express = require('express');
var sys = require('sys');
var oauth = require('oauth');
var app = express.createServer();
var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY";
var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET";
function consumer() {