Skip to content

Instantly share code, notes, and snippets.

View ribasushi's full-sized avatar
😒
unamused.

Peter Rabbitson ribasushi

😒
unamused.
View GitHub Profile
@ribasushi
ribasushi / perl_git_stats.pl
Last active December 7, 2016 18:16
Simple perl-centric git blame agregator
#!/usr/bin/env perl
use warnings;
use strict;
use File::Find qw/find/;
use Data::Dumper::Concise;
my $author_stats;
# As amply documented at:
#
# https://github.com/dbsrgits/dbix-class/blob/dc7d89911/lib/DBIx/Class/MethodAttributes.pm#L242-L298
# https://github.com/dbsrgits/dbix-class/blob/dc7d89911/lib/DBIx/Class/ResultSourceProxy.pm#L137-L143
# https://github.com/dbsrgits/dbix-class/blob/dc7d89911/lib/DBIx/Class/ResultSourceProxy.pm#L191-L262
#
perl -e '
{
# In your base Result class ( ...::Schema::BaseResult )
sub add_relationship {
my $self = shift;
my $opts = $_[3] || {};
# shut off all DBIC/perl-side cascading logic
$opts->{cascade_delete} = 0;
$opts->{cascade_update} = 0;
$opts->{cascade_copy} = 0;
@ribasushi
ribasushi / .lotusminer_config.toml
Last active April 21, 2022 05:22
Recommended miner settings
# During space-race-1 we tuned the dealbots frequency to not overwhelm the miners
# With space-race-2 underway your miner will be negotiating deals with a number of
# clients, who lack coordination among themselves. Therefore it is *very strongly*
# recommended to tune your miner parameters based on the sealing capacity you already
# known from space-race-1
#
# The numbers below are the bare minimum for a single-box, non-gpu miner, and are
# very conservative safe numbers. No doubt your miner can do better so you can bring
# these numbers up. But! Do not dial them too high: if you lose sectors due to an
# unresponsive miner, your clients will be... sad.
@ribasushi
ribasushi / dealstate_etl.bash
Last active January 29, 2023 23:04
Simple Filecoin StorageMarkets ETL
#!/bin/bash
set -eu
set -o pipefail
# derive API_INFO from implied defaults if necessary
LOTUS_PATH="${LOTUS_PATH:-$HOME/.lotus}"
LOTUS_CFG_MADDR="$( cat $LOTUS_PATH/api 2>/dev/null || true )"
FULLNODE_API_INFO="${FULLNODE_API_INFO:-${LOTUS_CFG_MADDR:-/ip4/127.0.0.1/tcp/1234/http}}"
@ribasushi
ribasushi / 2015-01-30.md
Last active December 29, 2023 22:52
The origins of the river of CPAN (QAH 2015)
Subject: What I want for Christm^W the QA hackathon
Date: Fri, 30 Jan 2015 12:20:46 +0100
From: Peter Rabbitson <rabbit@rabbit.us>
To: { about 35 people, various stakeholders around Perl and CPAN }

(This mail is addressed to a lot of people, mainly to the list of current participants, and then to some extra folks who I think ought to be in Berlin anyway, and even some more people on BCC. Sorry for taking your collective time)

Greetings!