Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env perl
use Mojolicious::Lite;
use Mojo::IOLoop;
get '/' => sub {
my $c = shift;
my $log = $c->app->log;
Mojo::IOLoop->timer(1 => sub { $log->debug('one') });
@niczero
niczero / rebus-minion.sh
Created June 10, 2016 13:21 — forked from mrenvoize/rebus-minion.sh
init.d script for starting multiple minion workers (Mojolicious)
#!/bin/bash
### BEGIN INIT INFO
# Provides: rebus-minion
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Provides Minion Workers for rebus:list jobs
# Description: This script with start/stop minion worker
@niczero
niczero / linktester.pl
Created June 10, 2016 13:20
Check for dead links recursively on a page
#!/usr/bin/env perl
use strict;
use warnings;
use Mojo::UserAgent;
my $base = shift or die "Usage: $0 http://example.com/foo/bar\n";
my @queue = ([$base = Mojo::URL->new($base)]);
my $ua = Mojo::UserAgent->new;
my %info;
@niczero
niczero / index.html
Created December 8, 2015 09:37 — forked from anonymous/index.html
Bootstrap 3 responsive columns of same height Bootstrap 3 responsive columns of same height // source http://jsbin.com/xokerexola
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bootstrap 3 responsive columns of same height</title>
<meta name="description" content="Bootstrap 3 responsive columns of same height">
<!-- include bootstrap -->
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<style id="jsbin-css">
/* USAGE
@niczero
niczero / word-parse.pl
Created November 23, 2015 10:17 — forked from ingydotnet/word-parse.pl
Parse words from a string of smushed together words with a single regexp
#!/usr/bin/env perl
use strict;
# Get all the letters from stdin:
my $input = do {local $/; <>};
$input =~ s/[^a-zA-Z]//g;
# All 3+ letter English words, longest to shortest:
my @long = grep {length > 2}
sort {length $b <=> length $a}