Skip to content

Instantly share code, notes, and snippets.

@maka-io
maka-io / .gitignore
Created May 6, 2018 22:30
For meteor projects
*.swp
*.swo
.DS_Store
node_modules/
.meteor/local/
.coverage/
production/
development/
@maka-io
maka-io / .travis.yml
Last active May 6, 2018 22:28
Meteor Travis-CI file for Meteor 1.6.1.1+
language: node_js
node_js:
- 9
cache:
directories:
- $HOME/app/node_modules
- $HOME/app/.meteor/
before_install:
const typeDef = `
type FeatureCollection {
type: String!
Features: [Feature]!
}
type Feature {
type: String!
geometry: Geometry!
properties: Properties
@maka-io
maka-io / checkProps.js
Created February 6, 2018 21:26
Meteor React propTypes checker
if (Meteor.isDevelopment) {
checkProps = (propTypes, props) => {
let matchPropTypes = Object.keys(propTypes).every((a, index) => a === Object.keys(props)[index])
if (!matchPropTypes) {
console.info(`[!] propTypes do not match props`, `[propTypes]`, Object.keys(propTypes), `[props]`, Object.keys(props))
}
};
} else {
checkProps = (propTypes, props) => {};
import gql from 'graphql-tag';
import { Query } from 'react-apollo';
const query = gql`
query SomeQuery {
foo {
bar
baz
}
}
@maka-io
maka-io / EsriMapComponent.jsx
Last active February 6, 2018 22:49
How to load react-esri into meteor (maka)
import React, { Component } from 'react';
import EsriLoader from 'esri-loader-react';
import { Map } from 'react-arcgis';
class EsriMapComponent extends Component {
constructor(props) {
super(props);
this.state = {
loaded: false
@maka-io
maka-io / mg-config.js
Last active November 6, 2017 14:18
MongoDB Connection
const mgConfig = {
mgHost: 'localhost',
mgPort: 27017,
mgDb: ''
};
const mgLocalConfig = `mongodb://${mgConfig.mgHost}:${mgConfig.mgPort}/${mgConfig.mgDb}`;
export default mgLocalConfig;
@maka-io
maka-io / ms-config.js
Created November 6, 2017 14:13
Microsoft SQL Server connection
const msLocalConfig = {
msHost: '',
msDb: '',
msUser: '',
msPassword: '',
msPort: 1433,
msTimeoutMilli: 20000,
msMaxPoolClients: 10,
msPoolTimeoutMilli: 30000
};
@maka-io
maka-io / pg-config.js
Created November 6, 2017 14:11
Postgresql Database conenction
const pgLocalConfig = {
pgUser: '',
pgDatabase: '',
pgPassword: '',
pgHost: 'localhost',
pgPort: 5432,
pgMaxPoolClients: 10,
pgTimeoutMilli: 5000
};
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).