Skip to content

Instantly share code, notes, and snippets.

View moltar's full-sized avatar
📦
Building stuff.

Roman moltar

📦
Building stuff.
View GitHub Profile
@moltar
moltar / transmission
Created April 25, 2012 15:30
DIYSeedbox.com init script for Transmission
#!/bin/bash
#
# chkconfig: - 16 84
# description: Start up transmission-daemon
#
# processname: transmission-daemon
# config: /etc/sysconfig/transmission
# source function library
. /etc/rc.d/init.d/functions
@moltar
moltar / gist:3085366
Created July 10, 2012 18:32
sample field types
[
{
"type" : "text",
"label" : "Username",
"required" : true
},
{
"type" : "password",
"label" : "Password"
},
/Users/roman/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/veewee-0.2.3/bin/veewee:75:in `<top (required)>': undefined method `match' for nil:NilClass (NoMethodError)
from /Users/roman/.rbenv/versions/1.9.3-p194/bin/veewee:23:in `load'
from /Users/roman/.rbenv/versions/1.9.3-p194/bin/veewee:23:in `<main>'
/Users/roman/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/virtualbox-0.9.2/lib/virtualbox/com/ffi/interface.rb:128:in `[]': invalid memory read at address=0x00000000000000 (FFI::NullPointerError)
from /Users/roman/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/virtualbox-0.9.2/lib/virtualbox/com/ffi/interface.rb:128:in `initialize_vtbl'
from /Users/roman/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/virtualbox-0.9.2/lib/virtualbox/com/ffi/interface.rb:122:in `initialize'
from /Users/roman/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/virtualbox-0.9.2/lib/virtualbox/com/implementer/ffi.rb:27:in `new'
from /Users/roman/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/virtualbox-0.9.2/lib/virtualbox/com/implementer/ffi.rb:27:in `ffi_interface'
from /Users/roman/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/virtualbox-0.9.2/lib/virtualbox/com/implementer/ffi.rb:80:in `call_vtbl_function'
from /Users/roman/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/virtualbox-0.9.2/l
[default] Running provisioner: Vagrant::Provisioners::Puppet...
[default] Running Puppet with /tmp/vagrant-puppet/manifests/init.pp...
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Error: Cannot alias File[/home/vagrant/www/create] to ["/home/vagrant/www"] at /tmp/vagrant-puppet/manifests/init.pp:60; resource ["File", "/home/vagrant/www"] already declared at /tmp/vagrant-puppet/manifests/init.pp:160
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
cd /tmp/vagrant-puppet/manifests && puppet apply --modulepath '/tmp/vagrant-puppet/modules-0' /tmp/vagrant-puppet/manifests/init.pp
file { "$install_dir/create":
path => $install_dir,
ensure => 'directory',
owner => vagrant,
group => vagrant,
}
## ....
## make links to host wordpress dirs
file { "$install_dir/create":
path => $install_dir,
ensure => 'directory',
owner => vagrant,
group => vagrant,
}
## ....
file { "$install_dir/chown":
#!/usr/bin/env perl
use warnings;
use strict;
use Archive::Tar;
my $filename = $ARGV[0];
die "Specify filename as first argument.\n" unless $filename;
use DBIx::Class::Candy
-base => 'SW::Schema::Result',
-autotable => v1,
-components => [
qw/
EncodedColumn
/
];
use DBIx::Class::Candy
@moltar
moltar / db.pm
Created November 7, 2012 02:42
model
package SW::Web::Model::DB;
use Moose;
extends 'Catalyst::Model::DBIC::Schema';
use SW::Schema::RestrictingObject;
## CatalystX::Component::Traits
# has '+_trait_merge' => (default => 1);