Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
andrescalco / package.json
Created May 25, 2018
Add/Remove NSAppTransportSecurity rule for localhost on React Native ios project
View package.json
"scripts": {
"enable_local": "plutil -insert NSAppTransportSecurity -xml \"<dict><key>NSExceptionDomains</key><dict><key>localhost</key><dict><key>NSExceptionAllowsInsecureHTTPLoads</key><true/></dict></dict></dict>\" ios/myProject/Info.plist",
"remove_local": "plutil -remove NSAppTransportSecurity ios/myProject/Info.plist"
dunglas / example.php
Created Apr 19, 2018
A minimalist GraphQL client for PHP
View example.php
$query = <<<'GRAPHQL'
query GetUser($user: String!) {
user (login: $user) {
repositoriesContributedTo {
racerxdl / haproxy.conf
Created Mar 28, 2018
pgbouncer + haproxy + cockroach nodes
View haproxy.conf
listen pgsql
bind *:3307
mode tcp
timeout client 10800s
timeout server 10800s
timeout connect 1s
balance leastconn
server node0 check inter 10000
server node1 check inter 10000
server node2 check inter 10000
eLement87 / mqtt_tls_working.ino
Created Dec 10, 2017
ESP8266 Secure MQTT Connection with Client Certificate Authentication
View mqtt_tls_working.ino
#include <FS.h>
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
#include <PubSubClient.h>
#include <time.h>
// Insert your FQDN of your MQTT Broker
#define MQTT_SERVER "mqtt.srvx1.local"
const char* mqtt_server = MQTT_SERVER;
danielfttorres / RegisterScreen.js
Last active Apr 25, 2018
A example of Mutation using Relay Modern and React Native
View RegisterScreen.js
// @flow
import React, { PureComponent } from 'react'
import { View, Text, TextInput, TouchableOpacity } from 'react-native'
import { commitMutation, graphql } from 'react-relay'
import environment from './createRelayEnvironment'
import style from './'
* In Relay Modern a name pattern are used in Mutations or Queries, as example below:
* `ComponentName__MutationName__Mutation(...`
sibelius /
Last active Nov 30, 2020
Learning Path React Native


  • Learn how to start a new react native project
  • Run it on ios simulator, on android emulator, on a real iPhone device and on a real Android device, with and without debugging enabled.
  • Learn how to upgrade a react native project
  • Learn how to add a package to the project
  • Learn how to add a package that has a native dependency (, - DO NOT USE COCOAPODS
  • Learn how to use fetch to get data from your backend

Learn Navigation

sibelius / Info.plist
Created Nov 17, 2016
ios 10 permissions
View Info.plist
<!-- 🖼 Photo Library -->
<string><Your description goes here></string>
<!-- 📷 Camera -->
<string><Your description goes here></string>
<!-- 🎤 Microphone -->
knowbody /
Last active Sep 28, 2019
My exponent's ex-navigation docs/thoughts

Exponent - ex-navigation

This is for now, for my personal use only, things might not be correctly explained here. For the official docs please check:

Navigation bar configuration

On every screen you can use the built-in navigation bar, you can add a title, left button, right button or change navigation bar’s style. All you need to do is pass appropriate params to navigationBar in the route configuration:

import React, { Component } from 'react';

The unknown-prop warning will fire if you attempt to render a DOM element with a prop that is not recognized by React as a legal DOM attribute/property. You should ensure that your DOM elements do not have spurious props floating around.

There are a couple of likely reasons this warning could be appearing:

  1. Are you using {...this.props} or cloneElement(element, this.props)? Your component is transferring its own props directly to a child element (eg. When transferring props to a child component, you should ensure that you are not accidentally forwarding props that were intended to be interpreted by the parent component.

  2. You are using a non-standard DOM attribute on a native DOM node, perhaps to represent custom data. If you are trying to attach custom data to a standard DOM element, consider using a custom data attribute (

  3. React does not yet reco


Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

You can’t perform that action at this time.