Skip to content

Instantly share code, notes, and snippets.

View gcoonrod's full-sized avatar

Greg Coonrod gcoonrod

View GitHub Profile
@gcoonrod
gcoonrod / error-serializer.patch
Created September 12, 2020 14:46
Response logging with error serializer
diff --git a/src/actions/errors.ts b/src/actions/errors.ts
new file mode 100644
index 00000000..163eda37
--- /dev/null
+++ b/src/actions/errors.ts
@@ -0,0 +1,31 @@
+import { Action } from "./../index"
+
+export class TestError extends Action {
+ constructor() {
@gcoonrod
gcoonrod / ActionsVSRoutes.js
Created November 7, 2019 23:26
Actionhero and Expess comparision
// Actionhero Action
const {Action, api} = require('actionhero')
module.exports = class GetUser extends Action {
constructor () {
super()
this.name = 'getUser'
this.description = 'Get a user by their ID.'
this.inputs = {
id: {
@gcoonrod
gcoonrod / runner.rb
Created October 24, 2017 16:07
Script for storing timing information from build runs
#!/usr/local/bin/ruby
require 'open3'
require 'optparse'
require 'sqlite3'
require 'terminal-table'
db = SQLite3::Database.new 'timing.db'
options = {}
options[:ds_directory] = 'BUILD_DIR'
@gcoonrod
gcoonrod / console
Created January 7, 2016 20:57
Testing winston custom logging
> $ npm start ⬡ 4.2.1
> [email protected] start /Users/coonrod/dev/node/winston-test
> node index.js
2016-01-07T20:59:32.426Z - info: Logger initialized, standard log levels.
2016-01-07T20:59:32.429Z - info: Testing syslog levels. Info through emerg should be visible.
Attempting level trace
Attempting level debug
Attempting level info
@gcoonrod
gcoonrod / logger.js
Created January 7, 2016 18:51
Custom Logging Levels in AH 12.4
exports.default = {
logger: function(api) {
var logger = {
transports: []
};
logger.transports.push(function(api, winston) {
return new(winston.transports.Console)({
colorize: true,
@gcoonrod
gcoonrod / devd.rb
Created October 23, 2015 19:19
Devd Homebrew Formula
require "language/go"
class Devd < Formula
desc "A http daemon for local development"
homepage "https://github.com/cortesi/devd"
url "https://github.com/cortesi/devd/archive/v0.1.tar.gz"
version "0.1"
sha256 "7ea5251b951159e0e58f314f7b46ed0d97788a19aa0aef6fdfb0f1f87dd8a98e"
head "https://github.com/cortesi/devd/devd.git"
@gcoonrod
gcoonrod / collectd.conf
Last active August 29, 2015 14:02
Collectd 5.4.1 collectd.conf
# Config file for collectd(1).
#
# Some plugins need additional configuration and are disabled by default.
# Please read collectd.conf(5) for details.
#
# You should also read /usr/share/doc/collectd-core/README.Debian.plugins
# before enabling any more plugins.
#Hostname "localhost"
FQDNLookup true