Skip to content

Instantly share code, notes, and snippets.

@Htbaa
Htbaa / validation_class_test.pl
Created August 12, 2012 10:56
More Validation::Class woes
package Foo;
use Validation::Class;
directive 'is_troll' => sub {
my ($dir, $value, $field, $self) = @_;
foreach (@{$value}) {
if ($_->[1] !~ /application\/(x-)?pdf/i) {
$field->{errors}->add(sprintf('Error for %s', $_->[0]));
}
}
#!/bin/sh
### BEGIN INIT INFO
# Provides: Maximus
# Required-Start: $syslog $network
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Maximus script
# Description: Maximus script
@Htbaa
Htbaa / http.go
Last active December 16, 2015 05:19
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
resp, err := http.Get("http://maximus.htbaa.com/module/sources/json")
" Install https://github.com/junegunn/vim-plug first
call plug#begin()
" On-demand loading
Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'preservim/nerdcommenter'
Plug 'powerline/powerline'
Plug 'mattn/emmet-vim'
" Plug 'chreekat/vim-paren-crosshairs'
Plug 'vim-perl/vim-perl'
Plug 'dense-analysis/ale'