Skip to content

Instantly share code, notes, and snippets.

View justingosan's full-sized avatar

Justin justingosan

View GitHub Profile
import { createAction, handleActions } from 'redux-actions';
import apiClient from '../services/apiClient.service.js';
/* Default State */
const defaultState = { data: null, fetching: false, error: null };
/* Actions */
const getPharmaciesRequest = createAction('GET_PHARMACIES_REQUEST');
const getPharmaciesResponse = createAction('GET_PHARMACIES_RESPONSE');
const getPharmaciesError = createAction('GET_PHARMACIES_ERROR');
@justingosan
justingosan / cmd.sh
Created January 29, 2018 17:58
Quick docker mongodb
docker run --name mongodb -p 0.0.0.0:27017:27017 -v /data/mongo:/data/db -d mongo --auth
docker exec -it some-mongo mongo admin
db.createUser({ user: 'admin', pwd: 'mongo123$', roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] });

Keybase proof

I hereby claim:

  • I am justingosan on github.
  • I am justingosan (https://keybase.io/justingosan) on keybase.
  • I have a public key whose fingerprint is C2FF 2ACC 6A1A B2D3 FDB0 CF5E A1EF 6971 BC2C 66AD

To claim this, I am signing this object:

function chunkify(array, chunk) {
var i, j, temparray;
var chunked = [];
for (i = 0, j = array.length; i < j; i += chunk) {
temparray = array.slice(i, i + chunk);
chunked.push(temparray);
}
return chunked;
}