Skip to content

Instantly share code, notes, and snippets.

View browniefed's full-sized avatar
🎧
Building

Jason Brown browniefed

🎧
Building
View GitHub Profile
const NavItem = styled.li(
{
margin: "15px 0",
},
({ sub }) => ({
fontSize: ".8rem"
}),
);
<NavItem sub />
@browniefed
browniefed / gist:5855005
Created June 25, 2013 00:40
Quickbooks web connector write up. This is how the PHP SDK written by Consolibyte operates.
Quickbooks Process
-------------------
1) A QWC file is generated (file generateQWC.php). This creates the XML for the web connector, adds in the username to the qwc file, also writes the username/password to the quickbooks_user database.
2) The top of the server.php builds the global constants, and builds arrays that get passed into the web connector handler/php sdk.
2 a) QB_QUICKBOOKS_MAX_RETURNED is the amount of items that we tell quickbooks to send to us at one time. Limit this to a minimal amount.
2 b) Then we set up priorities (ie.QB_PRIORITY_CUSTOMER_IMPORT, QB_PRIORITY_INVOICE_IMPORT, etc). The higher the number means that this queue item will get run before the lower numbers.
This comes in handy when you are doing a customer import, and then an invoice import that has to link all invoices to customers. Setting customer import ot
higher than the invoice import will ensure that all customers are imported first.
2 c) $map variable: This links all the SDK functions to PHP functions. These obj
// Master Nav Setup
const Main = StackNavigator(
{
Landing: {
screen: LandingScreen,
},
SignIn: {
screen: SignInScreen,
import React, { Component } from "react";
import { View, Text, StyleSheet } from "react-native";
class componentName extends Component {
_scrollEnabled = false;
enable = () => {
this._scrollEnabled = true;
this._scrollView.setNativeProps({
{
"Create Panresponder": {
"prefix": "pancreate",
"body": [
"PanResponder.create({",
" onStartShouldSetPanResponder: (evt, gestureState) => true,",
" onMoveShouldSetPanResponder: (evt, gestureState) => true,",
" onPanResponderGrant: (e, gestureState) => {",
" ",
" },",
const keyMe = (key) => ({ key, specialId: key})
<Comp {...keyMe(key)} />
{ "swagger": "2.0",
"info": {
"title": "Loan Application API V2",
"version": "v2"
},"basePath":"/","tags":[{"name":"Loan Application API v2"},{"name":"Loan Application Document API v2"}],"paths":{"/loan/{loanUuid}/document":{"get":{"tags":["Loan Application Document API v2"],"summary":"Return documents associated with a loan.","description":"","operationId":"index","produces":["application/json"],"parameters":[{"name":"loanUuid","in":"path","required":true,"type":"string","x-example":"318120e7-9a8b-4f69-871e-ee06fed7419b"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Loan Documentation"}}},"security":[{"Mirador API Token.":[]}]}},"/loan/{loanUuid}/document/{documentUuid}/download":{"get":{"tags":["Loan Application Document API v2"],"summary":"Download a loan document. Response is binary data, with an associated content-type.","description":"","operationId":"download","produces":["*/*"],"parameters":[{"name":"loanUuid","in":"path","required":true,"type"
import React, { Component } from 'react';
import {AppRegistry, View, StyleSheet, Animated, Easing } from 'react-native';
export default class animatedbasic extends Component {
componentWillMount() {
this.animatedValue = new Animated.Value(1);
}
componentDidMount() {
Animated.timing(this.animatedValue, {
const mapDispatchToProps = {
startup: Something.startup,
slower: Something.slower
}
const mergeProps = (stateProps, dispatchProps, ownProps) {
return {
...ownProps,
...stateProps,
...dispatchProps,

RN mask link https://github.com/text-mask/text-mask/blob/reactNativeMasks/reactnative/src/reactNativeTextMask.js

The reason why text-mask is better than others is it doesn'y rely on onKeyUp or any key events. This makes it much more reliable on mobile devices w/ Samsung generally screwing events up w/ custom browser crap they build on top of chrome.

It only deals with previous value, next value, and cursor position.

Those are all typically accessible in onChange (sync) which allows us to make reliable updates for the value, as well as the new cursor position. In RN they are 2 separate calls. So it makes it a little more difficult as rather than onChange things need to be handled in onSelectionChange