Skip to content

Instantly share code, notes, and snippets.

View martinj's full-sized avatar

Martin Jonsson martinj

  • Gothenburg, Sweden
View GitHub Profile
@martinj
martinj / config.yaml
Created December 19, 2019 21:50
Turn off printer on thermal runaway
# What i added to ~/.octoprint/config.yaml
events:
enabled: true
subscriptions:
- command: ~/on-thermal-error.sh "{error}"
event: Error
type: system
@martinj
martinj / alb-parser.js
Created September 4, 2017 09:02
AWS ELB log parsing
'use strict';
const _ = require('lodash');
const StreamParser = require('./stream-parser');
class ApplicationLoadBalancerParser extends StreamParser {
constructor() {
super(parse);
}
}
@martinj
martinj / VersionableTest.php
Created November 23, 2011 09:56
Propel Versionable Foreign Object Test
<?php
class VersionableTest extends PHPUnit_Framework_TestCase
{
public function testVersionable()
{
Propel::disableInstancePooling();
$bar = new DBTableBar();
$bar->setName('My Bar');
$beer = new DBTableBeer();