Skip to content

Instantly share code, notes, and snippets.

@andrewalker
andrewalker / explaining
Created July 25, 2011 22:36
rafl explanation of components in the container (excerpt from irc)
so, we got this service subclass doing ACCEPT_CONTEXT and COMPONENT, right?
or two of them, or whatever
instances of that are generated while building the "default" container for your app
based on the components in your lib/ and whatnot
what you want to know is how to:
a) configure additional services in that container
super simple
container $default_container => as { more services };
b) make component services depend on that
trickier, as i can't think of a nice way to "amend" service definitions
* Big topics (design and hard to solve issues)
- Catalyst::Model::DBIC::Schema is broken because we build the service too early,
causing the COMPONENT method to be called early, breaking components which
build other components.
this:
sub COMPONENT {
...
*${appclass}::Model::TopLevel::GENERATED::ACCEPT_CONTEXT = sub { ... };
...
}
@andrewalker
andrewalker / watch.pl
Created June 14, 2012 19:12
Watch YAPC::NA on player of choice
#!/usr/bin/env perl
use warnings;
use strict;
# usage:
# mplayer $(perl watch.pl http://ics.webcast.uwex.edu/mediasite/Viewer/?peid=ceecb7a37e3f4dbbb13e7f5cc9f513291d)
my @parts = (shift =~ /\?peid=(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);
local $" = '-';
@andrewalker
andrewalker / Briefing Hackaton.pod
Last active December 13, 2015 17:28
Briefing Hackaton

Hackaton Business::CPI

O que é?

Business::CPI (Common Payment Interface) é um módulo em Perl que define uma interface padrão para comunicação entre programas feitos em Perl e intermediários financeiros (que chamamos no CPI de gateways).

@andrewalker
andrewalker / db
Last active December 17, 2015 07:49
Meu projeto inicial do DB
user
name
email
login
password
user_role
user
role
@andrewalker
andrewalker / gist:7454059
Created November 13, 2013 18:39
Request de pesquisa da CAPES
This file has been truncated, but you can view the full file.
$ telnet capesdw.capes.gov.br 80
Trying 200.130.18.154...
Connected to capesdw.capes.gov.br.
Escape character is '^]'.
POST /gsa/search; HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Host: capesdw.capes.gov.br
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0
Cookie: symfony=1o3nca5dm5lpnqmel1dkaaq1b4
Content-Length: 22
@andrewalker
andrewalker / ideias
Last active December 29, 2015 15:39
RFC Business::CPI::{Base|Role}::Receiver
Comecei a implementar a solução do problema que descrevo abaixo aqui:
https://github.com/andrewalker/p5-business-cpi/blob/master/lib/Business/CPI/Role/Receiver.pm
=============
Atualmente:
my $cpi = Business::CPI->new(
gateway => 'PayPal',
### Keybase proof
I hereby claim:
* I am andrewalker on github.
* I am andrewalker (https://keybase.io/andrewalker) on keybase.
* I have a public key whose fingerprint is 3013 472E FA53 8AFC 1B37 36D4 6158 780D 27C0 D33A
To claim this, I am signing this object:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCu4RFtuPQH0ynSDm7w7VrarNQHTjn4hvJkcCLajTDjz3EkoD+miMDcuZLqJb0y+DOSNEI4Y+8CrOS/hrw4mPohF250oOKkN5B3X9BpG2AAsKb3pfLYac64aJYDrEw78sRiIq+QzS1zC3w1gbN5anW/Z98CX2boT9f8XBiIZftqxKCJqXhWBXRca/0Yclawd3QVw22mBBxws924rOuRCQbmtjb0t8vngA3xhmrk9OAnfYEt0ROYsPGaHPo6XYW4CX2qH3ORjsqp/ikULU5i4DPVFfK2lw9I+Oe7UzX0+93N4BleTgx3TW0r9mcxlARxlSyLGXqyBIuNKLmBHQS1+csX andre@andrewalker
@andrewalker
andrewalker / test-cv.hs
Created August 2, 2015 21:25
Draft code used to convert CV from md to pdf
import Hakyll
import Text.Pandoc
import Text.Pandoc.PDF (makePDF)
import qualified Data.ByteString.Lazy as B
import qualified Text.Pandoc.UTF8 as UTF8
main = do
-- -- check for latex program
-- mbLatex <- findExecutable "pdflatex"
-- when (mbLatex == Nothing) $