Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Olaf Alders oalders

🏠
Working from home
View GitHub Profile
@oalders
oalders / setup.sh
Created January 6, 2023 20:14
Testing Rails apps in Docker (unzip archive in the container)
View setup.sh
#!/bin/bash
# Create an empty dir which contains only the .zip file of your app
# Copy this file to your app dir
# Save it as `setup.sh`
# Then run it via:
# docker run --rm -it -p 3000:3000 --volume $PWD:/sandbox ruby:3.2.0-bullseye ./sandbox/setup.sh
set -eux
@oalders
oalders / setup.sh
Created January 6, 2023 19:55
Testing Rails apps in Docker
View setup.sh
#!/bin/bash
# Copy this file to your app dir
# Save it as `setup.sh`
# Then run it via:
# docker run --rm -it -p 3000:3000 --volume $PWD:/app ruby:3.2.0-bullseye ./app/setup.sh
set -eux
apt update
@oalders
oalders / gist:f930f26af8563c08d5d57dfae6714f6c
Last active December 12, 2022 20:32
error building WWW-Mechanize
View gist:f930f26af8563c08d5d57dfae6714f6c
[@Author::OALDERS/stale modules, build] checking for stale modules...
[DZ] beginning to build WWW-Mechanize
[@Author::OALDERS/Git::Contributors] multiple names with the same email found: you may want to use a .mailmap file (https://www.kernel.org/pub/software/scm/git/docs/git-shortlog.html#_mapping_authors)
[@Author::OALDERS/StaticInstall] setting x_static_install to 1
[@Author::OALDERS/Git::Contributors] Warning: distribution has non-ascii characters in contributor names. META.json will be unparsable on perls <= 5.8.6 when JSON::PP is lower than 2.27300
[DZ] writing WWW-Mechanize in WWW-Mechanize-2.16
[@Author::OALDERS/CopyFilesFromBuild] Copied WWW-Mechanize-2.16/cpanfile to cpanfile
[@Author::OALDERS/CopyFilesFromBuild] Copied WWW-Mechanize-2.16/LICENSE to LICENSE
[@Author::OALDERS/CopyFilesFromBuild] Copied WWW-Mechanize-2.16/Makefile.PL to Makefile.PL
[@Author::OALDERS/CopyFilesFromBuild] Copied WWW-Mechanize-2.16/META.json to META.json
@oalders
oalders / gist:fae520a36ea6cd197a31dbab226bb8f4
Created October 7, 2022 21:29
PerlNavigator Debug log
View gist:fae520a36ea6cd197a31dbab226bb8f4
[Trace - 5:25:10 PM] Sending request 'initialize - (0)'.
Params: {
"processId": 22655,
"clientInfo": {
"name": "Visual Studio Code",
"version": "1.72.0"
},
"locale": "en-us",
"rootPath": "/Users/olaf/Documents/perl-scratch",
"rootUri": "file:///Users/olaf/Documents/perl-scratch",
@oalders
oalders / pod-spell-check.pl
Created September 21, 2022 20:55
Pod Spell Checking Script
View pod-spell-check.pl
#!/usr/bin/env perl
# Mostly borrowed from Code::TidyAll::Plugin::PodSpell
use 5.36.0;
use Capture::Tiny qw( capture );
use FindBin ();
use IPC::Run3 qw( run3 );
use Pod::Spell ();
@oalders
oalders / gist:179d60173ff178d199f06711729d73e7
Created September 9, 2022 22:19
perlimports ALE config
View gist:179d60173ff178d199f06711729d73e7
" Author: Olaf Alders <https://github.com/oalders>
" Description: This file adds support for perlimports
call ale#Set('perl_perlimports_executable', 'perlimports')
function! ale_linters#perl#perlimports#Handle(buffer, lines) abort
let l:pattern = '\(.\+\) at \(.\+\) line \(\d\+\)'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
@oalders
oalders / dots.svg
Created July 28, 2022 21:04
MetaCPAN dots
View dots.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oalders
oalders / gist:b7d403c83e5e5ce014f0fcff99d34e03
Created November 30, 2021 17:38
Default install via carton
View gist:b7d403c83e5e5ce014f0fcff99d34e03
git clone git@github.com:perl-carton/carton.git
cd carton/
perl -Ilib -MLWP::ConsoleLogger::Everywhere script/carton
Installing modules using /Users/olafalders/Documents/github/carton/cpanfile
GET http://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Capture-Tiny-0.48.tar.gz
.---------------------------------+--------------.
| Request (before sending) Header | Value |
+---------------------------------+--------------+
| User-Agent | Menlo/1.9019 |
View gist:5d89ba6784d84fdba2a8911e5a770932
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
@oalders
oalders / gist:623ced01fbd3449575ce883f455e4bac
Created April 1, 2021 15:08
Class::Unload vs Import::Into
View gist:623ced01fbd3449575ce883f455e4bac
#!/usr/bin/env perl
use strict;
use warnings;
require Class::Unload;
require Import::Into;
Class::Unload->unload('Import::Into');