Skip to content

Instantly share code, notes, and snippets.

Banging away on whatev's

Michael D. Stemle, Jr. manchicken

Banging away on whatev's
View GitHub Profile
manchicken / cpanfile
Last active Oct 1, 2020
A quick cpanfile so I don't have to remember dependencies anymore
View cpanfile
requires 'Module::CAPIMaker' => '0';
requires 'Math::Int64' => '0';
manchicken /
Last active Sep 29, 2020
This is a quick-and-dirty script I put together to help me convert SMTP messages to JSON similar to what I would get in a Lambda. The reason I wanted this was because I have some files from S3 in buckets which were forwarded via a Lambda, but they're not in the format that SNS sends to the Lambda. I want to add extra processing to the Lambda bas…
#!/usr/bin/env perl
use Modern::Perl '2020';
use Carp qw/croak/;
use JSON;
use Email::MIME;
use IO::File;
sub get_smtp {

Keybase proof

I hereby claim:

  • I am manchicken on github.
  • I am stemlem ( on keybase.
  • I have a public key ASCrcoQd82uvEOqt2ZjzexgX3ck1PYtWenAroVkPH1UMRQo

To claim this, I am signing this object:

View gist:6d7c8c4ec15f9637e833c55c66a07461
✔ ~/Devel/perl6-posix-1 [refactoring|✚ 3]
22:45 $ perl6 --ll-exception -Ilib t/02-getuid.t
Could not find symbol '&DEFAULT'
at SETTING::src/core/ (/usr/local/Cellar/rakudo-star/2017.10/share/perl6/runtime/CORE.setting.moarvm:throw)
from SETTING::src/core/ (/usr/local/Cellar/rakudo-star/2017.10/share/perl6/runtime/CORE.setting.moarvm:throw)
from SETTING::src/core/ (/usr/local/Cellar/rakudo-star/2017.10/share/perl6/runtime/CORE.setting.moarvm:CALL-ME)
from gen/moar/BOOTSTRAP.nqp:3002 (/usr/local/Cellar/rakudo-star/2017.10/share/nqp/lib/Perl6/BOOTSTRAP.moarvm:)
from /Users/manchicken/Devel/perl6-posix-1/lib/ (POSIX):9 (/Users/manchicken/Devel/perl6-posix-1/lib/.precomp/272B80FC0A239CB25AC22453FE7B3B3434A80F34.1512853927.34594/23/23507E798D66FEE0B05313C2A15E15FF93E82F20:EXPORT)
from src/Perl6/World.nqp:880 (/usr/local/Cellar/rakudo-star/2017.10/share/nqp/lib/Perl6/World.moarvm:)
from src/Perl6/World.nqp:848 (/usr/local/Cellar/rakudo-star/2017.10/sh
manchicken / index.html
Created Dec 29, 2016
Inspecting Browser-Supplied MIME-Types
View index.html
<form method="post" enctype="multipart/form-data" id="form" onSubmit="return runIt();">
<label for="fileInput">Select a File</label>
<input multiple="true" type="file" id="fileInput" name="fileInput" />
<input type="submit" name="submit" value="Check!" />
manchicken / rest-server-for-tests.js
Last active Nov 7, 2016
This is a simple HTTP server which gives you predictable HTTP responses based on the URL. It's super simple. This requires `lodash`.
View rest-server-for-tests.js
'use strict'
const http = require('http')
const _ = require('lodash')
// Create an HTTP tunneling proxy
var svr = http.createServer( (req, res) => {
// Just some simple handler routines
const handlers = _.merge(
manchicken /
Last active Jun 3, 2016
Simple command to find all of the images in a large directory tree
find ./public -type f | grep --line-buffered -i -E '\.(jpg|jpeg|bmp|gif|png)' | grep -v dojo
# OR
find -E ./public -type f -iregex '.*\.(jpg|jpeg|bmp|gif|png)' | grep -v dojo
# Compare the results of the two commands using MD5 sums:
find -E ./public -type f -iregex '.*\.(jpg|jpeg|bmp|gif|png)' | grep -v dojo | md5
# 65cc4b9df9eb6f99ecce0b5b1d209ecc
grep -aroP '.{0,20}XXXXX.{0,20}' {*.log,*.log-????????}
manchicken / Results.txt
Last active Oct 20, 2015
Inspired by, I want to see just `strtolower()` in an if though, and I wanted to see the results for larger values of `n`
View Results.txt
mstemle@mstemle901:~/Desktop$ ./
String length: 512
* if + strtolower *
Time: 0.001159
Memory: 1904
* strcasecmp *