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
| const findLoader = (config, test) => { | |
| const loaders = [].concat(config.module.loaders); | |
| while (loaders.length) { | |
| const loader = loaders.shift() | |
| if (loader.test && loader.test.toString() === test.toString()) { | |
| return { loader, index: loaders.length } | |
| } | |
| } | |
| } | |
| module.exports = function override(config, env) { |
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
| const gulp = require('gulp'); | |
| const plumber = require('gulp-plumber'); | |
| // css | |
| const postcss = require('gulp-postcss'); | |
| // HACK | |
| const concat = require('gulp-concat') | |
| const inject = require('gulp-inject-string') |
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
| /** | |
| * Sample React Native App | |
| * https://github.com/facebook/react-native | |
| * @flow | |
| */ | |
| import React, { Component } from 'react'; | |
| import { | |
| AppRegistry, | |
| StyleSheet, |
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
| /** | |
| * Sample React Native App | |
| * https://github.com/facebook/react-native | |
| * @flow | |
| */ | |
| import React, { Component } from 'react'; | |
| import { | |
| AppRegistry, | |
| StyleSheet, |
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
| # Old | |
| [latStr, lngStr] = String.split(geo, ",") | |
| {lat, _} = Float.parse(latStr) | |
| {lng, _} = Float.parse(lngStr) | |
| [bl, tr] = Geocalc.bounding_box([lat,lng], 10_000) | |
| [lat1, lng1] = bl; | |
| [lat2, lng2] = tr; | |
| coords = "#{lat1}, #{lng1}, #{lat2}, #{lng2}" |
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
| # elixir | |
| {:ok, pid} = Mongo.start(database: "test") | |
| coll = "tags" | |
| pipeline = [ | |
| %{'$project': %{ 'b': %{ '$in': ["b", ["a", "b", "c"]] } }}, | |
| %{'$match': %{ 'b': true }}, | |
| %{'$project': %{ 'b': 0 }} | |
| ] | |
| Mongo.aggregate(pid, coll, pipeline) |> Enum.to_list |
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
| #!/bin/bash | |
| set -e | |
| CURRENT_NAME="CurentName" | |
| CURRENT_OTP="current_name" | |
| NEW_NAME="NewName" | |
| NEW_OTP="new_name" |
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
| /** | |
| * Small helper to split an array into groups of various size | |
| * | |
| * Usage: | |
| * group([1, 2, 3, 4, 5], 2) # -> [[1, 2], [3, 4], [5]] | |
| * group([1, 2, 3, 4], 5) # -> [[1, 2, 3, 4]] | |
| **/ | |
| let group = (arr, numPerGroup) => { | |
| if (arr.length <= 0) return []; | |
| let groups = []; |
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, { Component } from 'react'; | |
| import { | |
| Text, | |
| View, | |
| TouchableOpacity, | |
| ActivityIndicator, | |
| Navigator | |
| } from 'react-native'; | |
| import {GoogleSignin} from 'react-native-google-signin'; | |
| import Firestack from 'react-native-firestack' |
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 { Provider } from 'react-redux' | |
| import { AppRegistry } from 'react-native'; | |
| import App from './containers/App' | |
| import { | |
| configureStore | |
| } from './redux/configureStore' | |
| const {store, actions} = configureStore(); |