Skip to content

Instantly share code, notes, and snippets.

@mattmcmanus
mattmcmanus / _form.jade
Created March 11, 2011 21:53
An issues I'm running into w/ node, exporess, jade and mongoose
...
h2 Services to monitor
ul.services
!=partial('_form_service', server.services)
li
a(href='javascript:void(0)') Add Another
@mattmcmanus
mattmcmanus / css3.styl
Created March 31, 2011 01:40
A collection of mixins for Stylus to make using css3 a breeze
// MIXINS
vendor(prop, args)
-webkit-{prop} args
-moz-{prop} args
-o-{prop} args
{prop} args
animation()
vendor('animation', arguments)
@mattmcmanus
mattmcmanus / my.cnf
Created April 11, 2011 14:02
Output from the tuning-primer.sh script
[mysqld]
# SLLLLOOOWWWW Queries
log_slow_queries = /var/log/mysql/mysql-slow.log
long_query_time = 2
log-queries-not-using-indexes
wait_timeout=60
@mattmcmanus
mattmcmanus / stdout.log
Created June 28, 2011 17:18
Mongoose-Auth bug?
GET / 6 ms
starting step - getRequestToken
...finished step
starting step - storeRequestToken
...finished step
starting step - redirectToProviderAuth
...finished step
GET /auth/twitter 444 ms
starting step - extractTokenAndVerifier
...finished step
@mattmcmanus
mattmcmanus / pt-semester-duplicate.php
Created November 22, 2011 16:40
Bulk node cloning in drupal
<?php
// Assumptions - READ ME
// ====================================
// * You have terms setup, which are literal academic terms setup as taxonomy terms. Ie: 2011 - Spring, 2012 - Spring
// * You have another taxonmy setup for academic units. In this setup there are Units 1-23
//
// What does this do?
// ====================================
// It duplicates specific nodes. For example:
// * Duplicate Units 5-9,15-20 and PT800 from spring 2011 to spring 2012
@mattmcmanus
mattmcmanus / edu-pb.css
Created May 24, 2012 19:00
Pagebuilder CSS
/*---------------Page Builder Dropzones----------------*/
/* Clearing silly defaults */
.page-builder .PBViewing {
float:none;
}
/*#ticker, #ticker_content, #ticker_content_one, #ticker_content_two {
height: 300px;
}*/
<?php
// Assumptions - READ ME
// ====================================
// * You have terms setup, which are literal academic terms setup as taxonomy terms. Ie: 2011 - Spring, 2012 - Spring
// * You have another taxonmy setup for academic units. For this site, there are Units 1-23
//
// What does this do?
// ====================================
// It duplicates specific nodes. For example:
// * Duplicate Units 5-9,15-20 and PT800 from spring 2011 to spring 2012
@mattmcmanus
mattmcmanus / main.cf
Created July 10, 2012 20:42
Postfix Config
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
#!upstart
description "Accountable"
author "mattmcmanus"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on shutdown
respawn
respawn limit 5 60 # give up restart after 5 respawns in 60 seconds
@mattmcmanus
mattmcmanus / conf-config.js
Created August 10, 2012 14:51
Node Configuration
var fs = require('fs'),
stylus = require('stylus'),
nib = require('nib'),
gzip = require('connect-gzip'),
express = require('express'),
MongoStore = require('connect-mongo')(express),
settings = require('./settings');
module.exports = function(app, at, express) {
app.set('environment', settings.NODE_ENV);