Skip to content

Instantly share code, notes, and snippets.

View LeftyBC's full-sized avatar
🏍️
work

Colin Moller LeftyBC

🏍️
work
View GitHub Profile
@LeftyBC
LeftyBC / test.rb
Created November 9, 2018 20:12
working solution
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)
@LeftyBC
LeftyBC / lxc-centos
Last active January 4, 2016 17:39 — forked from hagix9/lxc-centos
#!/bin/bash
#
# template script for generating CentOS container for LXC
#
#
# lxc: linux Container library
# Authors:
######################################################################################
##
## 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 September 17, 2013 02:00
sip.conf, extensions.conf that has issues with my Avaya
[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)
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 March 12, 2012 16:55
Example of parameterized class + if
class foo($do_file_block = undef) {
if $do_file_block {
file { '/tmp/somefile':
ensure => file,
}
}
}
@LeftyBC
LeftyBC / gist:1597627
Created January 12, 2012 00:12
Fragment of Lefty's vagrantfile showing puppet provisioner config
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 January 5, 2012 00:48
Vagrantfile for a three-box VM setup
# -*- 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 January 4, 2012 21:04
Vagrant error in check_port_collisions
[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