Skip to content

Instantly share code, notes, and snippets.

@nate-strauser
nate-strauser / churnQueue.ps1
Created April 9, 2012 21:33 — forked from bmccormack/churnQueue.ps1
Churn through the Kiln Queue with restarts
function get-queueLength(){
try {
$s = (New-Object net.webclient).DownloadString('http://localhost:56785/stats.json')
}
catch {
return "queue length unavailable"
}
$queueLength = $s -split (',') | foreach{if ($_ | select-string "queueLength" -quiet){ ($_ -split ":")[1]}}
return $queueLength
}
@nate-strauser
nate-strauser / meteor-ses-heorku.md
Created January 17, 2013 21:37
Email configuration to Amazon SES with Meteor on Heroku

Follow instructions below to get meteor emails sending correctly from heroku using amazon ses

  1. set up smtp access via aws console, get your smtp credentials

  2. using a javascript console (chrome dev tools / firebug) run

encodeURIComponent("SES_SMTP_USERNAME")

encodeURIComponent("SES_SMTP_PASSWORD")

@nate-strauser
nate-strauser / af-deploy.sh
Created March 3, 2013 01:31
meteorite deploy to appfog with bundled dependencies
#!/bin/bash
app=${1}
npm install
echo "Bundling $app"
mrt bundle bundle.tar.gz
tar -xzf bundle.tar.gz
rm -rf bundle.tar.gz
pushd bundle
echo "Fixing bundle for appfog"
rm -rf server/node_modules/fibers
var events = [
{ name: 'submit', from: 'pending', to: 'processing' },
{ name: 'update', from: 'processing', to: 'processing' },
{ name: 'finish', from: 'processing', to: 'finished' },
{ name: 'fail', from: '*', to: 'failed' }
];
var callbacks = {
onsubmit: function(event, from, to, obj) {
log.info("submit: " + obj.title);
<template name="sortableTableHeaderIcons">
<i class="icon-caret-down sortIcon desc pull-right"></i><i class="icon-caret-up sortIcon asc pull-right"></i>
</template>
<template name="xxx">
<table class="table table-striped table-bordered table-hover">
<thead>
{{#constant}}
<tr>
<th class="sortableTableHeader" data-field="name">
Meteor.startup(function () {
if(!Meteor.roles.findOne({name: "admin"}))
Roles.createRole("admin");
if(!Meteor.roles.findOne({name: "baker"}))
Roles.createRole("baker");
if(Users.find().count() === 0){
log.info('no users detected, loading sample data');
html>>>>
<select id="schoolSystem" name="system" placeholder="System" data-required="true" class="input-large" data-required-message="System is required">
<option></option>
{{#each systems}}
<option value="{{_id}}">{{name}}</option>
{{/each}}
</select>
#!/usr/bin/python
# Connects to servers vulnerable to CVE-2014-0160 and looks for cookies, specifically user sessions.
# Michael Davis (mike.philip.davis@gmail.com)
# Based almost entirely on the quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import select
@nate-strauser
nate-strauser / gist:a1b23aa336894110ee6f
Created September 5, 2015 04:13
State machine example
var events = [
{ name: 'approve', from: 'pending', to: 'approved' },
{ name: 'reject', from: 'pending', to: 'rejected' },
{ name: 'fail', from: '*', to: 'failed' }
];
var callbacks = {
onapprove: function(event, from, to, order) {
var setObject = {
{
"galaxy.meteor.com": {
"env": {
"ROOT_URL": "http://www.weworkmeteor.com",
"MONGO_URL": "mongodb://wework:PASSWORD@candidate.15.mongolayer.com:10058,candidate.14.mongolayer.com:10058/wework",
"MONGO_OPLOG_URL": "mongodb://wework:PASSWORD@candidate.15.mongolayer.com:10058,candidate.14.mongolayer.com:10058/local?authSource=wework",
"MAIL_URL": "smtp://postmaster@weworkmeteor.com:PASSWORD@smtp.mailgun.org:587"
}
},
"public": {