Skip to content

Instantly share code, notes, and snippets.

Mike Cavaliere mcavaliere

Block or report user

Report or block mcavaliere

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
@henrikhaugboelle
henrikhaugboelle / app.test.js
Last active Apr 12, 2019
Example of running appium locally on android device with jest and async/await.
View app.test.js
/**
* Example of running BrowserStacks Appium WikipediaSample test app locally
* using jest and async/await instead of promise chains.
*
* Before running, you should install appium and make sure that all dependencies
* are met with appium-doctor. Get started at:
*
* http://appium.io/docs/en/about-appium/getting-started/?lang=en
*/
@joelbowen
joelbowen / README.md
Last active Sep 19, 2018
create-react-native-app environment variables
View README.md

Change your app.json to base-app.json and untrack the original file in your .gitignore

Then add something like "generateConfig": "rimraf app.json && node generateConfig" to your package.json scripts, and yarn generateConfig && react-native-scripts start to scripts like "start" or any others that may need app.json generated.

@andrewmunro
andrewmunro / .babelrc
Created Jul 17, 2017
Sequelize cli with ES6
View .babelrc
{
"presets": ["es2015"],
"plugins": [
"add-module-exports"
],
}
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active Nov 11, 2019
Difference between Shallow, Mount and render of Enzyme
View enzyme_render_diffs.md

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@leader22
leader22 / index.ios.js
Last active Dec 17, 2018
getUserMedia() w/ React Native WebRTC
View index.ios.js
// @flow
import React, { Component } from 'react';
import {
AppRegistry,
Button,
StyleSheet,
Text,
View
} from 'react-native';
import {
View template-testimonials-native.php
<?php
/**
* Template Name: Testimonials - Native Functions
*/
add_action( 'genesis_entry_content', 'prefix_output_testimonials' );
/**
* Output ACF testimonials.
*
* @link https://acfextras.com/simple-testimonials-repeater-field/
View template-testimonials.php
<?php
/**
* Template Name: Testimonials - ACF Functions
*/
add_action( 'genesis_entry_content', 'prefix_output_testimonials' );
/**
* Output ACF testimonials.
*
* @link https://acfextras.com/simple-testimonials-repeater-field/
@mmazzarolo
mmazzarolo / Appfile
Created May 17, 2016
Simple Fastlane setup for React-Native (Android - iOS)
View Appfile
# iOS
app_identifier "com.myapp.app" # The bundle identifier of your app
apple_id "me@gmail.com" # Your Apple email address
team_id "1234ABCD" # Developer Portal Team ID
# Android
json_key_file "./google-play-api-secret.json" # Path to the json secret file - Follow https://github.com/fastlane/supply#setup to get one
package_name "com.myapp.app" # Your Android app package
@benpickles
benpickles / action.js
Created Mar 18, 2016
Inject an Authorization header into a redux-api-middleware request with a Redux middleware.
View action.js
import { CALL_API } from 'redux-api-middleware'
export function fetchLocations() {
return {
[CALL_API]: {
endpoint: 'http://api.somesite.com/api/locations',
method: 'GET',
// Don't have to manually add the Authorization header to every request.
headers: { 'Content-Type': 'application/json' },
types: ['REQUEST', 'SUCCESS', 'FAILURE']
@nrollr
nrollr / MySQL.md
Last active Sep 13, 2019
Install MySQL on El Capitan using Homebrew
View MySQL.md

Install MySQL on OS X El Capitan

Normally the installation of MySQL can be achieved with a single command, which executes a script provided by MacMiniVault : bash <(curl -Ls http://git.io/eUx7rg)

However, at the time of writing the script is not compatible with OS X El Capitan (10.11)

Install MySQL using Homebrew

An alternative to the aforementioned installation script is installing MySQL using Homebrew. This gist assumes you already have Homebrew installed, if not first read the article "Homebrew and El Capitan"

Make sure Homebrew has the latest formulae, so run brew update first

You can’t perform that action at this time.