Skip to content

Instantly share code, notes, and snippets.

my $server = $c->stash( 'server' );
my $group = $c->model->server->get_server( $server )->group;
my @servers = $c->model->server->get_servers_in_group( $group );
# ... OR ...
my @servers = $c->model->server->get_servers_in_group( $c->model->server->get_server( $server )->group );

NAME

CoolApp

SYNOPSIS

# config.yml
1/2 cup unsalted butter, plus more to butter the molds
4 ounces bittersweet chocolate, preferably Valrhona
2 eggs
2 egg yolks
1/4 cup sugar
2 teaspoons flour, plus more for dusting
1. In the top of a double boiler set over simmering water, heat the butter and
chocolate together until the chocolate is almost completely melted. While
tags title
community
A Community is a Reflection of its Leaders

I've been in charge of a certain community for a very long time. Before my actual tech career started, even. Back when doing websites was just a hobby I didn't want to ruin by getting money involved.

use strict;
use warnings;
no warnings 'experimental::smartmatch';
my $text = <<ENDTEXT;
Řádek pro automatické zpracování:
DOMAINREN|domain.com|2342432|123432424|3242432
ONLINE|stufandssssssssss
ENDTEXT
@preaction
preaction / shell.html
Last active January 9, 2016 21:19
Proposal for shell session highlighting
<pre><samp class="hljs">$ <kbd class="hljs-shell"><span class="hljs-keyword">echo</span> <span class="hljs-string">'hello'</span></kbd>
hello
</samp></pre>
<pre><samp class="hljs">$ <kbd class="hljs-shell"><span class="hljs-keyword">git</span> <span class="hljs-option">-c</span> log <span class="hljs-option">-n2</span></kbd>
<span class="ansi-fg-yellow">commit f12c3c0434f144ee09c0dcfda2a819600baad2a4</span>
Author: Doug Bell <[email protected]>
Date: Fri Jan 8 21:19:39 2016 -0600
add better error message when include not found
cpanm (App::cpanminus) 1.7039 on perl 5.020002 built for x86_64-linux-gnu-thread-multi
Work directory is /home/aaw/aaw_rami/dbell/.cpanm/work/1452024624.42409
You have make /usr/bin/make
You have /usr/bin/wget
You have /bin/tar: tar (GNU tar) 1.27.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
@preaction
preaction / shell.pl
Last active December 10, 2015 22:22
use Mojolicious::Lite;
use Mojo::IOLoop;
use Mojo::IOLoop::Stream;
websocket '/' => sub {
my ( $c ) = @_;
my ( $stream, $id );
$c->on( message => sub {
tags title
yertl
perl
ygrok - Parse plain text into data structures

As a data warehouse, a significant part of my job involves log analysis. Besides the standard root cause analysis, I need to verify database writes, diagnose user access issues, and look for under-used (and