Skip to content

Instantly share code, notes, and snippets.

View TBSliver's full-sized avatar

Tom Bloor TBSliver

View GitHub Profile
@TBSliver
TBSliver / Authen-Passphrase-MyCustomAlg.pm
Last active October 7, 2022 08:39
Custom Authen::Passphrase Algorithm
package Authen::Passphrase::MyCustomAlg;
=head1 DESCRIPTION
Override for a custom passphrase type
=cut
use strict;
use warnings;
@TBSliver
TBSliver / open-valheim-ports.ps1
Created February 5, 2021 19:57
Valheim Server Scripts (Windows Server)
# Will need to be run as an administrator
$rule_name = "Valheim Server 1"
# Change ports as needed
$tcp_ports = "2456,2457,2458"
# Change ports as needed
$udp_ports = "2456,2457,2458"
netsh advfirewall firewall add rule name="${rule_name}: TCP" dir=in protocol=tcp localport=$tcp_ports action=allow
netsh advfirewall firewall add rule name="${rule_name}: UDP" dir=in protocol=udp localport=$udp_ports action=allow
<VirtualHost *:80>
ServerName nodecg.example.com
Redirect permanent / https://nodecg.example.com/
</VirtualHost>
<VirtualHost *:443>
ServerName nodecg.example.com
ServerAdmin hosting@example.com
@TBSliver
TBSliver / MyApp.pm
Last active March 27, 2019 14:14
DBIx::Class::AuditAny with user_id column
package MyApp;
# Insert extra Mojo style bits - this uses mojo, but can be easily modified to be any other framework
has auditor => sub {
my $c = shift;
use MyApp::Audit::DataPoint;
return DBIx::Class::AuditAny->track(
schema => $c->app->schema,
@TBSliver
TBSliver / MySchema.pm
Created January 4, 2018 12:45
Enable SQL::Translator debugging in a DBIC Schema
package MySchema;
use strict;
use warnings;
use base qw/ DBIx::Class::Schema /;
# insert setup code here...
sub sqlt_deploy_hook {

Keybase proof

I hereby claim:

  • I am tbsliver on github.
  • I am tbsliver (https://keybase.io/tbsliver) on keybase.
  • I have a public key ASAqHCk464kDtNkGNy7M--xlFmwlqkz6Twn1WRYs3_RGhAo

To claim this, I am signing this object:

Nov 06 19:44:25 [info] Creating canary table
Nov 06 19:44:41 [info] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
#! /usr/bin/env perl
use strict;
use warnings;
=head1 NAME
make_schema - Make or update a schema from the database
=cut
@TBSliver
TBSliver / marlin-mcp3018-proposal.md
Created May 13, 2015 01:08
Marlin MCP3018 Proposal

Current options

DIGIPOT_I2C in Marlin/Configuration_adv.h

This triggers inclusion of:

  • triggering digipot_i2c_set_current in Marlin/Marlin_main.cpp (lines 4849 - 4854)
  • Inclusion of all the code from Marlin/digipot_mcp4451.cpp - this file is actually included by default in the Marlin/Makefile? why is this not set in a
@TBSliver
TBSliver / Frame.gcode
Created December 5, 2014 17:15
Failing Print in Octoprint
This file has been truncated, but you can view the full file.
M140 S70.000000
M109 T0 S195.000000
T0
M190 S70.000000
;Sliced at: Fri 05-12-2014 15:02:45
;Basic settings: Layer height: 0.2 Walls: 0.8 Fill: 20
;Print time: #P_TIME#
;Filament used: #F_AMNT#m #F_WGHT#g
;Filament cost: #F_COST#
;M190 S70 ;Uncomment to add your own bed temperature line