Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# in versions
dir=`pwd`
versions=`ls`
for version in $versions
do
if [ -d "$dir/$version" ]; then
cd $dir/$version
@mattmcmanus
mattmcmanus / Rakefile
Created January 23, 2013 02:17 — forked from stammy/Rakefile
# ignore the "bit" stuff.. only relevant to my custom jekyll fork
desc 'create new post or bit. args: type (post, bit), title, future (# of days)'
# rake new type=(bit|post) future=0 title="New post title goes here" slug="slug-override-title"
task :new do
require 'rubygems'
require 'chronic'
type = ENV["type"] || "bit"
title = ENV["title"] || "New Title"
@mattmcmanus
mattmcmanus / mailFilters.xml
Created March 11, 2013 13:30
Gmail Notifications Filter
<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>
<title>Mail Filters</title>
<id>tag:mail.google.com,2008:filters:1359735724802</id>
<updated>2013-03-11T13:27:31Z</updated>
<author>
<name>Matt McManus</name>
<email>mattmcmanus@gmail.com</email>
</author>
<entry>
<category term='filter'></category>
@mattmcmanus
mattmcmanus / .jslintrc
Created March 11, 2013 13:38
My JSHint Config
{
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"boss": true,
@mattmcmanus
mattmcmanus / gist:5768826
Created June 12, 2013 20:28
Filter a json file using streams
var es = require('event-stream');
es.pipeline(
fs.createReadStream(ummon.config.log.path, {flags: 'r', encoding: 'utf-8'}),
es.split(),
es.parse(),
es.mapSync(function (data) {
if (key) {
if (data[key] && data[key] === val) {
return data;
@mattmcmanus
mattmcmanus / subl-project.sh
Created July 5, 2013 13:03
Loops through your projects|www|src directory and automatically create Sublime Text project files
#!/bin/sh
projectsFolder="/Users/matt/Dropbox/Apps/subl-projects"
cwd=`pwd`
for project in *; do
file="$projectsFolder/$project.sublime-project"
[ -d $project ] && [ ! -f $file ] && (
echo "Creating project file for $project"
@mattmcmanus
mattmcmanus / bench.js
Created August 1, 2013 20:25
A simple example of accepting post requests and streaming them directly to a log file. To test, load up the server > node index.js, the run the benchmark: node bench.js
var request = require('request');
var async = require('async');
var time = process.hrtime();
var totalConnections = 0;
var simultaneousConnections = 500;
// Make the array async.each will loop over
@mattmcmanus
mattmcmanus / imap-backup folders
Created December 10, 2013 15:36
imap-backup errors
$ imap-backup folders
***email***
/home/matt/.rvm/gems/ruby-1.9.3-p484/gems/imap-backup-1.0.3/bin/imap-backup:68:in `block in <top (required)>': undefined method `each' for nil:NilClass (NoMethodError)
from /home/matt/.rvm/gems/ruby-1.9.3-p484/gems/imap-backup-1.0.3/lib/imap/backup/configuration/list.rb:25:in `block in each_connection'
from /home/matt/.rvm/gems/ruby-1.9.3-p484/gems/imap-backup-1.0.3/lib/imap/backup/configuration/list.rb:23:in `each'
from /home/matt/.rvm/gems/ruby-1.9.3-p484/gems/imap-backup-1.0.3/lib/imap/backup/configuration/list.rb:23:in `each_connection'
from /home/matt/.rvm/gems/ruby-1.9.3-p484/gems/imap-backup-1.0.3/bin/imap-backup:66:in `<top (required)>'
from /home/matt/.rvm/gems/ruby-1.9.3-p484/bin/imap-backup:23:in `load'
from /home/matt/.rvm/gems/ruby-1.9.3-p484/bin/imap-backup:23:in `<main>'
from /home/matt/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `eval'
@mattmcmanus
mattmcmanus / bootstrap.sh
Created December 18, 2013 15:56
Quickly setting up Graylog2 on Ubuntu
#!/bin/bash
# Install Mongo
[[ ! `which mongod` ]] &&
(
echo " --- Installing MongoDB"
sudo apt-key add /vagrant/10gen-gpg-key.asc
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update -qq
sudo apt-get install mongodb-10gen -y -qq
@mattmcmanus
mattmcmanus / style-guide.md
Last active January 4, 2016 00:29
The Beginning of a style guide for ce_bacchus

Baccus Style Guide

There are several things to keep in mind when writing the stylesheet for the app:

Markup & Styling Priorities

  1. Bootstrap: Does it fit into an existing component inside of bootstrap? Bootstrap's visual language is clearly defined and consistent. Most of our interface should be able to use the patterns already established.
  2. Custom Components: Does it fit into a custom component we've developed for the app or can a number of things be abstracted into a component?
  3. Page specific stylesheets: These should be the exception, not the norm. Whenever part of an interface cannot fall into any existing patterns then the styles should be put into a page or section specific stylesheet.