Skip to content

Instantly share code, notes, and snippets.

View mahcloud's full-sized avatar

Michael Hoffert mahcloud

View GitHub Profile
@mahcloud
mahcloud / package.json
Created February 27, 2017 19:56
package.json
{
"scripts": {
"start": "node_modules/brunch/bin/brunch watch --server",
"lint": "eslint test demo app",
"test": "jest"
},
"dependencies": {
"chai": "^3.5.0",
"chai-react": "^3.0.1",
"jest-enzyme": "^2.1.2",
source "$rvm_path/scripts/rvm"
rvm use `cat .ruby-version`
# allow postgres user to use "ident" authentication on Unix sockets
# (as per recent comments, omit "sameuser" if on postgres 8.4 or later)
local all postgres ident sameuser
# allow all other users to use "md5" authentication on Unix sockets
local all all md5
# for users connected via local IPv4 or IPv6 connections, always require md5
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
@mahcloud
mahcloud / rss_map.js.jsx
Created December 5, 2015 02:11
RSS Map React Component
var RSSMap = React.createClass({
mixins: [ReactFireMixin],
propTypes: {
firebaseURL: React.PropTypes.string.isRequired,
currentUserID: React.PropTypes.number.isRequired,
adminUser: React.PropTypes.bool.isRequired,
thomasArtsUser: React.PropTypes.bool.isRequired
},
def self.perform(rss_feed_id, rss_import_id)
rss_feed = RssFeed.find(rss_feed_id)
rss_feed.run(rss_import_id)
rss_import = RssImport.find(rss_import_id)
firebase = Firebase::Client.new(ENV['FIREBASE_URL'])
json = {
rss_feed.state_abbr.to_sym => {
fillKey: rss_feed.map_color(rss_import.id),
articles_count: rss_import.rss_articles.where(rss_feed_id: rss_feed.id).count,
@mahcloud
mahcloud / .vimrc
Created July 28, 2015 18:30
My vimrc file
" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
" you can find below. If you wish to change any of those settings, you should
" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
" everytime an upgrade of the vim packages is performed. It is recommended to
" make changes after sourcing debian.vim since it alters the value of the
" 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.