Skip to content

Instantly share code, notes, and snippets.

@dannymcc
dannymcc / caveatPatchor.js
Created October 21, 2011 22:32 — forked from protocool/caveatPatchor.js
Sample caveatPatchor.js file for use in Propane 1.1.2 and above
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@dannymcc
dannymcc / deploy.coffee
Created October 30, 2011 10:49
Deploy your application with hubot and deploy docus
# Allows Hubot to deploy, using Deploy Docus
#
# deploy <project> on <environment>
#
module.exports = (robot) ->
robot.respond /deploy (.*) (on|to|into) (.*)/, (msg) ->
if msg.message.user.type == "Member"
project = msg.match[1]
environment = msg.match[3]
@dannymcc
dannymcc / app.rake
Created March 11, 2012 22:46 — forked from ChuckJHardy/app.rake
Rake Task for Database Population
------------ From Rake Task
namespace :app do
# Checks and ensures task is not run in production.
task :ensure_development_environment => :environment do
if Rails.env.production?
raise "\nI'm sorry, I can't do that.\n(You're asking me to drop your production database.)"
end
end
class Clinical < ActiveRecord::Base
# ... snip rest of model...
def self.income_by_month
select( 'YEAR(transactiondate) as year, MONTH(transactiondate) as month, SUM(LineBalance) as income' )
.where(:payment => 0 )
.where('LineBalance <> 0' )
.where('analysiscode <> 213' )
.group(:monthyear)
@dannymcc
dannymcc / app.js
Created May 7, 2013 21:29 — forked from khash/app.js
Handlebars.registerHelper('equal', function(lvalue, rvalue, options) {
if (arguments.length < 3)
throw new Error("Handlebars Helper equal needs 2 parameters");
if( lvalue!=rvalue ) {
return options.inverse(this);
} else {
return options.fn(this);
}
});
@dannymcc
dannymcc / TuneUp.bat
Created December 26, 2012 15:50 — forked from illdecree/TuneUp.bat
@ECHO OFF
REM This program is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM (at your option) any later version.
REM
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@dannymcc
dannymcc / tmux.cheat
Last active December 7, 2017 14:21 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^a w
New -s <session> Create ^a c
Attach att -t <session> Rename ^a , <name>
Rename rename-session -t <old> <new> Last ^a l (lower-L)
Kill kill-session -t <session> Close ^a &

These are notes for myself on the crouton setup for my chromebook

1. Enter Developer Mode

Hold Power+ESC+Refresh, then let go of the power, when the OS verification warning screen appears enter Ctrl-D

2. Setup Crouton

Follow the instructions here to download the latest version of https://goo.gl/fd3zc.

@dannymcc
dannymcc / raspberry-pi-vpn-router.md
Created December 13, 2019 20:25 — forked from superjamie/raspberry-pi-vpn-router.md
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@dannymcc
dannymcc / config
Created May 1, 2020 21:28 — forked from jetpks/config
.irssi/config
servers = (
{
address = "irc.mikezauner.com";
chatnet = "zl4u";
port = "6697";
autoconnect = "yes";
use_ssl = "yes";
},
{
address = "irc.freenode.net";