Skip to content

Instantly share code, notes, and snippets.

☑️
‌‌

nic

☑️
‌‌
Block or report user

Report or block nic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@andrescalco
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"
},
@racerxdl
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 10.10.5.43:26257 check inter 10000
server node1 10.10.5.40:26257 check inter 10000
server node2 10.10.5.13:26257 check inter 10000
@danielfeelfine
danielfeelfine / 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 './RegisterScreen.style'
/**
* In Relay Modern a name pattern are used in Mutations or Queries, as example below:
* `ComponentName__MutationName__Mutation(...`
@sibelius
sibelius / learning.md
Last active Aug 25, 2019
Learning Path React Native
View learning.md

Basics

  • 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 (https://github.com/airbnb/react-native-maps, https://github.com/evollu/react-native-fcm) - DO NOT USE COCOAPODS
  • Learn how to use fetch to get data from your backend

Learn Navigation

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

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: https://github.com/exponentjs/ex-navigation/blob/master/README.md

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';
View react-unknown-prop.md

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. https://facebook.github.io/react/docs/transferring-props.html). 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 (https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes).

  3. React does not yet reco

View 20111011_SteveYeggeGooglePlatformRant.md

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.