Skip to content

Instantly share code, notes, and snippets.

🏍
work

Colin Moller LeftyBC

View GitHub Profile
@LeftyBC
LeftyBC / test.rb
Created Nov 9, 2018
working solution
View test.rb
n = 5
lines = Array.new(n)
for i in 0..(n-1)
lines[i] = 0
end
File.readlines("test").each do |item|
item = item.to_i
for i in 0..(n-1)
View lxc-centos
#!/bin/bash
#
# template script for generating CentOS container for LXC
#
#
# lxc: linux Container library
# Authors:
View 46xxsettings.txt
######################################################################################
##
## AVAYA IP TELEPHONE CONFIGURATION FILE TEMPLATE
## *** August 29, 2013 ***
##
## This file is intended to be used as a template for configuring Avaya IP telephones.
## Parameters supported by software releases up through the following are included:
##
## 96x1 H.323 R6.3
## 96x1 SIP R6.2.2
@LeftyBC
LeftyBC / extensions.conf
Created Sep 17, 2013
sip.conf, extensions.conf that has issues with my Avaya
View extensions.conf
[default]
[mycontext]
include => voipms-inbound
include => voipms-outbound
exten => 10,1,Log(NOTICE, Incoming call from ${CALLERID(all)} to ${EXTEN})
exten => 10,n,Dial(SIP/avaya,30)
View Eulogy
Ok, this is what I came up with... I hope it fits in with what's already there. Sorry it took me so long, but it's a tough thing to write...
"The first thing I think of when I think of Nana is her laugh. Nana had a very broad, joyful laugh that she never hesitated to use. One of my earliest memories is of her sprawling house in Boundary Bay and how, even if I was asleep in the "kids' bedroom" on the other side of the house, I could still hear Nana laughing. It wasn't something I realized at the time, but now that I'm older and looking back, I can appreciate how much it made me feel at ease."
Will call you this AM to discuss.
@LeftyBC
LeftyBC / gist:2023311
Created Mar 12, 2012
Example of parameterized class + if
View gist:2023311
class foo($do_file_block = undef) {
if $do_file_block {
file { '/tmp/somefile':
ensure => file,
}
}
}
@LeftyBC
LeftyBC / gist:1597627
Created Jan 12, 2012
Fragment of Lefty's vagrantfile showing puppet provisioner config
View gist:1597627
config.vm.define :wap_webserver do |wap_webserver|
wap_webserver.vm.box = "centos-60-x86_64"
wap_webserver.vm.provision :puppet do |puppet|
puppet.manifest_file = "wap_webserver.pp"
puppet.module_path = "puppet-modules"
puppet.manifests_path = "puppet-manifests"
end
#wap_webserver.vm.boot_mode = :gui
wap_webserver.vm.forward_port("wap-http",80,8080)
wap_webserver.vm.forward_port("wap-https",443,8443)
@LeftyBC
LeftyBC / Vagrantfile
Created Jan 5, 2012
Vagrantfile for a three-box VM setup
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# apache wap webserver
#config.vbguest.iso_path = "/usr/share/virtualbox/VBoxGuestAdditions.iso"
config.vm.define :wap_webserver do |wap_webserver|
wap_webserver.vm.box = "centos-60-x86_64"
wap_webserver.vm.provision :puppet do |puppet|
@LeftyBC
LeftyBC / gist:1562132
Created Jan 4, 2012
Vagrant error in check_port_collisions
View gist:1562132
[ass_webserver] Importing base box 'centos-60-x86_64'...
[ass_webserver] Progress: 90%/usr/lib/ruby/gems/1.8/gems/vagrant-0.9.0.dev/lib/vagrant/driver/virtualbox.rb:226: warning: regexp has invalid interval
/usr/lib/ruby/gems/1.8/gems/vagrant-0.9.0.dev/lib/vagrant/driver/virtualbox.rb:226: warning: regexp has `}' without escape
[ass_webserver] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.
Guest Additions Version: 4.1.0
You can’t perform that action at this time.