Skip to content

Instantly share code, notes, and snippets.

View jjasghar's full-sized avatar

JJ Asghar jjasghar

View GitHub Profile
#!/bin/bash
# collectd plugin to monitor passenger
# has better memory-requirement than a ruby script
# TODO: try writing it in c - if it makes a difference
HOSTNAME=`hostname -s`
PASSENGER_STATUS="/usr/local/bin/passenger-status"
PASSENGER_MEMORY_STATS="/usr/local/bin/passenger-memory-stats"
INTERVAL="${COLLECTD_INTERVAL:-10}"
PLUGIN_NAME="passenger_status"
{
"chef_type": "environment",
"cookbook_versions": {},
"default_attributes": {
},
"description": "The 1+N environment",
"json_class": "Chef::Environment",
"name": "1+n environment",
"override_attributes": {
"openstack": {
# Description:
# Anyone can have voice or op
#
# Commands:
# hubot make me an op
# hubot make <name> an op
# hubot give me voice
# hubot give <name> voice
module.exports = (robot) ->

channel operator quick reference

direct discussion about administrative action away from the main channel and into #reddit-diabetes-ops to minimise disruption. our -ops channel is the place where users should come to ask for our help. examples:

  • any sort of operator request or discussion of channel administration in the main channel
  • PMs asking why a ban was set
  • reports of harassment (unless the user is confiding in you)
  • any request for operator action

changing channel access permissions

#
# Copyright 2012 Mortar Data Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@jjasghar
jjasghar / index.js
Last active August 29, 2015 14:06 — forked from therealklanni/index.js
var fs = require('fs');
var rfs = fs.readFileSync;
var wfs = fs.writeFileSync;
var path = require('path');
var yaml = require('js-yaml');
var inquirer = require('inquirer');
var program = require('commander');
var version = require('./package.json').version;
program
#!/bin/sh
# https://gist.githubusercontent.com/octocat/0831f3fbd83ac4d46451/raw/git-author-rewrite.sh
git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
CORRECT_NAME="Greg Kitson"
CORRECT_EMAIL="[email protected]"
export GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
@jjasghar
jjasghar / README.md
Last active August 29, 2015 14:06 — forked from ejhayes/README.md

About

Use node-inspector to debug hubot!

sudo npm install -g node-inspector

Run Hubot in Debug Mode

coffee --nodejs --debug $(which hubot)

#
# Cookbook Name:: Cookbook
# Spec:: default
#
require 'spec_helper'
describe 'cookbook::default' do
shared_examples_for :default_recipe do
[DEFAULT]
#
# From tempest.config
#
# Whether to disable inter-process locks (boolean value)
#disable_process_locking = false
# Directory to use for lock files. (string value)