Skip to content

Instantly share code, notes, and snippets.

View mxmzb's full-sized avatar
🍜
Probably eating

Maxim mxmzb

🍜
Probably eating
View GitHub Profile
app
.factory('components', [
'$http',
'SERVER',
function($http, SERVER) {
var o = {
component: {},
components: [],
componentExercises: []
@mxmzb
mxmzb / docker-compose.yml
Created May 16, 2017 00:50
mongo instance port stuff
version: '3'
services:
# proxy:
# image: jwilder/nginx-proxy:latest
# ports:
# - "80:3000"
# volumes:
# - "/var/run/docker.sock:/tmp/docker.sock"
#
# https://github.com/docker/machine/issues/3982
@mxmzb
mxmzb / Auth.js
Created October 5, 2017 12:35
Auth0.com authentication
import Auth0Lock from 'auth0-lock';
// import auth0 from 'auth0-js';
import decode from 'jwt-decode';
// import { browserHistory } from 'react-router';
import history from './history';
export default class Auth {
lock = new Auth0Lock('GNx0zoCnEmuSz5T3JylON5hxEhMSe9Ki', 'artmarqet.auth0.com', {
@mxmzb
mxmzb / mutation.js
Created May 21, 2018 20:45
graphql nested objects
// this is client side
import gql from "graphql-tag";
export const createStoreMutation = gql`
mutation(
$name: String!
$brand: ID!
$country: String!
$region: String!
@mxmzb
mxmzb / index.js
Created June 29, 2018 10:47
Exercise Meta
class ExerciseMeta {
constructor(metaArr) {
// ... noise
}
format(type, value) {
// ... noise
return ["somevalue"]
}
@mxmzb
mxmzb / .babelrc
Created July 11, 2018 16:29
babel-jest in a monorepo
// .babelrc in packages/foodloc-models/.babelrc
{
"presets": ["env", "react"],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-modules-commonjs",
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-export-default-from"
]
@mxmzb
mxmzb / screen.js
Last active August 27, 2018 13:22
rn screen file
import React, { Fragment } from "react";
import { SafeAreaView } from "react-native";
import { Query } from "react-apollo";
import { scheduleQuery } from "src/modules/Schedule/graphql/queries";
import { Header, HeaderConfig } from "src/modules/shared/components";
import { ScheduleFull } from "src/modules/Schedule/components";
export default class ScheduleScreen extends React.PureComponent {
static navigationOptions = ({ navigation }) => {
@mxmzb
mxmzb / Installer Log 09-27-18.txt
Created September 27, 2018 08:21
OSX Mojave Installer Log
Sep 27 07:55:20 localhost powerd[173]: powerd process is started
Sep 27 07:55:23 localhost Unknown[522]: kern.boottime: { sec = 1538034904, usec = 0 } Thu Sep 27 07:55:04 2018
Sep 27 07:55:23 localhost Installer Progress[181]: Progress UI App Starting
Sep 27 07:55:28 localhost Unknown[535]: Launching the Language Chooser for an OS Install
Sep 27 07:55:28 localhost bspowerassertiontool[530]: Tool exited successfully (0).
Sep 27 07:55:28 localhost launchprogresswindow[533]: ISAP: Show progress UI called
Sep 27 07:55:52 MacBook-Pro Installer Progress[181]: IASGetCurrentInstallPhaseList: phases = (
{
ConclusionDelay = 0;
InstallPhase = "Boot 1";
@mxmzb
mxmzb / Separator.js
Created October 7, 2018 15:02
A RN module
import React from "react";
import styled, { ThemeProvider } from "styled-components";
import config from "../../config";
const Background = styled.View`
width: ${props => props.width}px;
height: ${props => props.height}px;
background-color: ${props => props.background};
justify-content: flex-end;
`;
@mxmzb
mxmzb / apolloClient.js
Last active September 25, 2019 11:24
Apollo link
import { ApolloClient } from "apollo-client";
import link from "./apolloLink";
const client = new ApolloClient({
link,
});
export default client;