Skip to content

Instantly share code, notes, and snippets.

View btisdall's full-sized avatar

Ben Tisdall btisdall

View GitHub Profile
@btisdall
btisdall / ping_from_list
Created August 8, 2011 15:27
Ben's cobbled together ping from a list applescript
activate
set chosenListItem to choose from list ¬
{"1.2.3.4", "5.6.7.8", "some.public.hostname"} ¬
with title ¬
"Ping" with prompt ¬
"Select host" default items ¬
"10.5.0.254" OK button name ¬
"OK" cancel button name ¬
"Cancel" multiple selections allowed false ¬
with empty selection allowed
PERL_DL_NONLAZY=1 /opt/perl-5.12.3/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/recipes/basics/*.t
t/anon.t .............................. ok
t/attribute_issues.t .................. ok
t/autoclean.t ......................... ok
t/basic.t ............................. ok
t/clean.t ............................. ok
t/import.t ............................ ok
t/inner_keywords.t .................... ok
t/manual_namespace.t .................. ok
t/meta_should_be_signature.t .......... ok
@btisdall
btisdall / pdeploy.rb
Created January 30, 2012 09:44
Semi-automatic deploy using Puppet & Capistrano
load "servers" # this file contains our role definitions
def run_on_nodes(cmd)
# Use a default role
unless exists?(:servers)
set :servers, "dev"
end
# invoke find_servers() appropriately depending on whether the 'restrict' opt was passed.
@btisdall
btisdall / servers.rb
Created January 30, 2012 15:49
Server role config
role :frontend, "web1.example.com", :cluster_a => true
role :frontend, "web2.example.com", :cluster_a => true
role :frontend, "web3.example.com", :cluster_a => true
role :frontend, "web4.example.com", :cluster_b => true
role :frontend, "web5.example.com", :cluster_b => true
role :frontend, "web6.example.com", :cluster_b => true
The metaclass of Cloud::Boot::Cmd::Command::userdata (Moose::Meta::Class::__ANON__::SERIAL::21) is not compatible with the metaclass of its superclass, MooseX::App::Cmd::Command (Moose::Meta::Class::__ANON__::SERIAL::3) at /Users/bentis/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/darwin-2level/Class/MOP/Class.pm line 241.
Class::MOP::Class::_check_class_metaclass_compatibility('Moose::Meta::Class::__ANON__::SERIAL::21=HASH(0x7fed58cb0090)', 'MooseX::App::Cmd::Command') called at /Users/bentis/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/darwin-2level/Class/MOP/Class.pm line 220
Class::MOP::Class::_check_metaclass_compatibility('Moose::Meta::Class::__ANON__::SERIAL::21=HASH(0x7fed58cb0090)') called at /Users/bentis/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/darwin-2level/Class/MOP/Class.pm line 958
Class::MOP::Class::superclasses('Moose::Meta::Class::__ANON__::SERIAL::21=HASH(0x7fed58cb0090)', 'MooseX::App::Cmd::Command', 'Cloud::Boot') called at /Users/bentis/perl5/perlbrew/pe
# MyClass.pm
package Cloud::Meta::Attribute::Trait::UserData;
use Moose::Role;
has 'is_userdata' => (
is => 'ro',
isa => 'Bool',
default => 1,
);
set ruler
set nohls
syntax on
set autoindent smartindent
set tabstop=4
set shiftround
set shiftwidth=4
set expandtab
set wildmode=longest,list
set vb
- is this a single game ?
-- Y return the result
-- N - for each element, do
--- is elem a game ?
---- Y - play it and replace contents of element with result, continue
---- N - ascend to elem[0]
----- is elem[0] a game ?
------ Y - play it and replace contents of element with result, continue
------ N - ascend to elem[0][0]
------- ....
# development.pp
stage { 'req-install': before => Stage['rvm-install'] }
class misc {
package {
[
'vim',
]:
ensure => installed,
}
Index: what_version
===================================================================
--- what_version (revision 46893)
+++ what_version (working copy)
@@ -1,6 +1,8 @@
#!/usr/bin/env ruby
-require_relative "BabelRelease"
+$: << '.' if RUBY_VERSION >= '1.9.2'
+