Skip to content

Instantly share code, notes, and snippets.

@maka-io
maka-io / .gitignore
Created October 10, 2016 19:34 — forked from marcoslin/.gitignore
Encryption: From PyCrypto to CryptoJS
source.sh
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
if [[ $(uname) != "Darwin" ]]; then
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
source ~/.bashrc
export BASH_SILENCE_DEPRECATION_WARNING=1
export PATH=$PATH:.
# export PATH=$PATH:/usr/bin
export PATH=$PATH:/opt/metasploit-framework/bin
export PATH=$PATH:/usr/local/sbin
#export WINEARCH=win32
# 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).
@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
};
@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 / 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 / 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
import gql from 'graphql-tag';
import { Query } from 'react-apollo';
const query = gql`
query SomeQuery {
foo {
bar
baz
}
}
@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) => {};