This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import processImage from 'process-image'; | |
var file = /* File() object from drag-n-drop or file input */ | |
var imageProcessOpts = { | |
maxWidth: 1200, | |
maxHeight: 1200, | |
quality: 0.6 | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MockCLLocationManager.swift | |
// | |
// Created by Manish Katoch on 11/28/17. | |
// Copyright © 2017 Manish Katoch. All rights reserved. | |
// | |
import Foundation | |
import CoreLocation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { ApolloProvider } from 'react-apollo'; | |
import { Provider } from 'react-redux'; | |
import hoistNonReactStatic from 'hoist-non-react-statics'; | |
export default apolloAndReduxProviderHOC = (WrappedComponent, store, client) => { | |
class Enhance extends React.Component { | |
render () { | |
return ( | |
<Provider store={store}> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moved to https://github.com/ebidel/puppeteer-examples |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
platform :ios do | |
desc "This is beta lane" | |
lane :beta do | |
get_provisioning_profile( | |
adhoc: true, | |
force: true | |
) | |
increment_build_number | |
gym(export_method:"ad-hoc", | |
scheme: "Golee", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// inspiration: https://dribbble.com/shots/4370657-Share-Your-Feedback | |
import React, { Component, Fragment } from "react"; | |
import { Animated, StyleSheet, Text, View, TouchableOpacity, Dimensions, Platform, Easing, TextInput, KeyboardAvoidingView, Image } from "react-native"; | |
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5'; | |
const { width: windowWidth } = Dimensions.get('window'); | |
const Icon = (props) => <FontAwesome5 {...props} /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Prompt(){ | |
$W = Split-Path -leaf -path (Get-Location) | |
$prompt = Write-Prompt "$($env:UserName)@$($env:ComputerName):" -ForegroundColor Green | |
$prompt += Write-Prompt $W -ForegroundColor DarkCyan | |
$prompt += Write-Prompt '>' | |
return ' ' | |
} | |
function Remove-StoppedContainers { | |
docker container rm $(docker container ls -q) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sequential | |
function App() { | |
let one = Resource.read('1') | |
let two = Resource.read('2') | |
let three = Resource.read('3') | |
return ( | |
<div> | |
<div>{one}</div> | |
<div>{two}</div> | |
<div>{three}</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { onError } from 'apollo-link-error'; | |
import { Observable } from 'apollo-link'; | |
import { buildAuthHeader } from 'utils/requests'; | |
import { getProvider as getGlobalProvider } from 'GlobalState'; | |
let isFetchingToken = false; | |
let tokenSubscribers = []; | |
function subscribeTokenRefresh(cb) { | |
tokenSubscribers.push(cb); |