This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
# This portion simply calculates the baseip from the ip/mask | |
baseip="" | |
addr_parts = scope.lookupvar("ipaddress").split('.') | |
mask_parts = scope.lookupvar("netmask").split('.') | |
addr_parts.zip((0..addr_parts.size).to_a).map do |n,i| | |
baseip += (n.to_i & mask_parts[i].to_i).to_s + "." | |
end | |
baseip = baseip[0..-2] | |
-%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class opennetadmin::dcm inherits opennetadmin { | |
case $operatingsystem { | |
Debian,Ubuntu: { | |
package { | |
'libio-socket-ssl-perl': | |
ensure => present, | |
before => File['dcm.pl'], | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Author: Matt Pascoe - matt@opennetadmin.com | |
# | |
# usage: ./parseshowroute.sh <filename> | |
# | |
# Takes the output of a "show ip route" command from an IOS device | |
# and processes it. Simply get the output and save it to a file | |
# and then run this script against that file. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "precise64" | |
# Set a hostname | |
config.vm.host_name = "ona-vm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Requires fpm v0.4.20 at least | |
# | |
# rm -rf carbon-latest* ceres-latest* graphite-web-latest* whisper-latest* *.deb;rm -rf /opt/graphite/;dpkg -r python-whisper python-graphite-web python-carbon python-ceres python-txamqp | |
# | |
# This script needs "fpm". If you dont have it, | |
# run "gem install fpm" | |
# Then simply execute this script and it will create packages and install them on your system. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# Update the path to your lease file below | |
use strict; | |
use File::Copy; | |
#use DateTime; | |
#always parse a copy not the live file | |
#my $leasefile = '/var/lib/dhcpd/dhcpd.leases'; | |
my $leasefile = '/var/lib/dhcp/db/dhcpd.leases'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Rancor Monster: ($100) | |
- Loose in box, NO paperwork, original outer box | |
- Ewok Village: ($120) | |
- Complete parts, instruction sheet, loose NO BOX | |
- Micro Collection Bespin Freeze Chamber: ($80) | |
- Complete parts, instruction sheet, original outer box | |
- Patrol Dewback: ($110) | |
- Figure, Saddle, special eddition original outer box, harness is broken, no documentation | |
- AST-5 Vehicle: ($60) | |
- Vehicle, instruction and sticker sheet, original outer box |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# TODO: make command line options possible use $endline as selector | |
###$endline=true; | |
# TODO: allow a comment character in the mode that prints at the end of a line. user passable comment character. | |
# TODO: make it work with ipv6.. for now its ipv4 only | |
use Socket; | |
my %dnscache; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Main class can be found here: | |
* https://www.phpclasses.org/package/6621-PHP-Send-queries-to-a-DHCP-server.html | |
* | |
* A simple test script to demonstrate how to use the dhcpLeaseQuery class. | |
* Please read the note below first then edit the variables below as appropriate. | |
* Then simply run: php LeaseQuery.php | |
* |
OlderNewer