Skip to content

Instantly share code, notes, and snippets.

Avatar

JJ Asghar jjasghar

View GitHub Profile
View virt-import.sh
#!/bin/bash
# exit on any error
set -o errexit
# A few tunable variables
NAME='atomic'
NAME='try'
#NAME='test'
#DISK='/guests/rhel-guest-image-7.1-20150224.0.x86_64.qcow2'
View gist:f5525f48ca21662fabac

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

View gist:047d80159fc4a4fa2ce0
[DEFAULT]
#
# From tempest.config
#
# Whether to disable inter-process locks (boolean value)
#disable_process_locking = false
# Directory to use for lock files. (string value)
View default_spec.rb
#
# Cookbook Name:: Cookbook
# Spec:: default
#
require 'spec_helper'
describe 'cookbook::default' do
shared_examples_for :default_recipe do
View 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)

View git-author-rewrite.sh
#!/bin/sh
# https://gist.githubusercontent.com/octocat/0831f3fbd83ac4d46451/raw/git-author-rewrite.sh
git filter-branch --env-filter '
OLD_EMAIL="awaxa@awaxa.com"
CORRECT_NAME="Greg Kitson"
CORRECT_EMAIL="greg.kitson@gmail.com"
export GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
View 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
View awsstatus.coffee
#
# 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
View channel-op-cheatsheet.md

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

View hubot-irc-commands.coffee
# 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) ->