Skip to content

Instantly share code, notes, and snippets.

@omega
omega / userstyle.css
Created September 23, 2014 10:44
Slack userstyle
/* your source here */
/*
.loading #col_channels,
.loading #col_channels_bg,
.loading div#team_menu,
.loading div#user_menu {
width: 0 !important;
}
#col_channels, #col_channels_bg,div#team_menu, div#user_menu {
@omega
omega / keybase.md
Created September 24, 2014 02:42
keybase.md

Keybase proof

I hereby claim:

  • I am omega on github.
  • I am omega (https://keybase.io/omega) on keybase.
  • I have a public key whose fingerprint is 3FDF 2196 AB86 34E9 BBB9 0A05 C35E A2C4 5AC7 9998

To claim this, I am signing this object:

has 'user' => (is => 'ro', isa => 'Str', default => 'nobody');
has 'group' => (is => 'ro', isa => 'Str', default => 'nogroup');
after 'daemonize' => sub {
my $self = shift;
return unless $self->is_daemon;
return unless (defined $self->user and defined $self->group);
my $uid = getpwnam($self->user) or $self->log->error( "cannot find uid for username: " . $self->user);
my $gid = getgrnam($self->group) or $self->log->error("cannot find gid for group: " . $self->group);
#!/usr/bin/perl
use strict;
use warnings;
use Net::DNS;
my $res = Net::DNS::Resolver->new;
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dump qw/dump/;
use List::Uniq 'uniq';
my %pkgs;
#!/usr/bin/perl
use Search::Xapian;
my $doc = Search::Xapian::Document->new();
my $tg = Search::Xapian::TermGenerator->new();
$tg->set_document($doc);
repo layout:
tags/
Component-A-0.12
Component-B-0.15
branches/
BUG-123/
Feature-X
experiment-omega
trunk/
#!/usr/bin/perl -w
package Role;
use Moose::Role;
has '_default_rows' => (is => 'rw', isa => 'Int');
after 'BUILD' => sub {
my $self = shift;
$self->_default_rows($self->rows);
};
sub BUILD {}
#!/usr/bin/perl -w
use strict;
use Test::More tests => 7;
use WWW::Curl::Easy;
use HTTP::Request;
my $url = 'http://en.wikipedia.org/wiki/Main_Page';
my $req = HTTP::Request->new( GET => $url );
isa_ok( $req, 'HTTP::Request' );
## This is my attempt at writing a simple grammar in perl6
class EasyCMS::Template {
method render (Str $in, %vars) {
EasyCMS::Template::Grammar.parse($in)
or fail "could not parse: $in";
#$in ~~ /EasyCMS::Template::Grammer::TOP/;
my $s;
for $/<token>.values -> $token {