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
root@ip-10-14-10-142:~# export INSTANCE_ID=`ec2metadata --instance-id` | |
root@ip-10-14-10-142:~# HOSTNAME=`aws ec2 describe-tags --region us-east-1 --filter "Name=resource-id,Values=$INSTANCE_ID" 'Name=key,Values=Name' | perl -ne 'chomp; my @a = split(/[ ]+/); next unless $a[1] eq "\"Value\":"; $a[2] =~ s/\"([\d\w\.\-]+)\".+/$1/; print "$a[2]\n"'` | |
root@ip-10-14-10-142:~# hostname $HOSTNAME | |
root@ip-10-14-10-142:~# echo $HOSTNAME | |
www.example.com | |
root@ip-10-14-10-142:~# echo $HOSTNAME > /etc/hostname |
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 crap.php | |
<?php | |
if (!defined('frmDs')){ | |
define('frmDs' ,1); | |
error_reporting(0); | |
function frm_dl ($url) { | |
if (function_exists('curl_init')) { | |
$ch = curl_init($url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
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
$template = "qa3-template" | |
$datastore = "NAS1" | |
$vmNamePrefix = "qa3-filler" | |
$vmhost = Get-VMHost -Name "prod-vm202.prod.host.com" | |
$vmpool = "QA3 RP" | |
$location = "Junk Boxes" | |
$taskTab = @{} | |
# Create all the VMs specified in $newVmList | |
for ($i = 2; $i -lt 10; $i++) { | |
$vmname = $($vmNamePrefix + $i); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<zabbix_export> | |
<version>2.0</version> | |
<date>2013-05-16T13:46:38Z</date> | |
<groups> | |
<group> | |
<name>Templates</name> | |
</group> | |
</groups> |
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
2013-03-22 14:56:52 EDT 17889 0 1/1 WARNING: xlog min recovery request D6D/2A61C1B0 is past current point D63/2BF6C10 | |
2013-03-22 14:56:52 EDT 17889 0 1/1 CONTEXT: writing block 6 of relation base/16898/5389031_vm | |
xlog redo vacuum: rel 1663/16898/7237776; blk 103357, lastBlockVacuumed 30068 | |
2013-03-22 14:56:52 EDT 17889 0 1/1 WARNING: xlog min recovery request D68/248B82D8 is past current point D63/2BF6C10 | |
2013-03-22 14:56:52 EDT 17889 0 1/1 CONTEXT: writing block 0 of relation base/16898/4876829_vm | |
xlog redo vacuum: rel 1663/16898/7237776; blk 103357, lastBlockVacuumed 30068 | |
2013-03-22 14:56:53 EDT 17895 0 WARNING: xlog min recovery request D67/2AAE9D40 is past current point D63/2BF6C10 | |
2013-03-22 14:56:53 EDT 17895 0 CONTEXT: writing block 0 of relation base/16898/5484157_vm | |
2013-03-22 14:56:55 EDT 17895 0 WARNING: xlog min recovery request D6D/33FC44E0 is past current point D63/2BF6C10 | |
2013-03-22 14:56:55 EDT 17895 0 CONTEXT: writing block 5 of relation base/16898 |
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
http://changelogs.ubuntu.com/meta-release | |
httplib2_0.7.4-2_all.deb | |
https_0.9.7.5ubuntu5.2_amd64.deb | |
http://security.ubuntu.com/ubuntu/dists/quantal-security/InRelease | |
http://security.ubuntu.com/ubuntu/dists/quantal-security/main/binary-amd64/Packages.bz2 | |
http://security.ubuntu.com/ubuntu/dists/quantal-security/main/binary-i386/Packages.bz2 | |
http://security.ubuntu.com/ubuntu/dists/quantal-security/main/debian-installer/binary-amd64/Packages.gz | |
http://security.ubuntu.com/ubuntu/dists/quantal-security/main/i18n/Translation-en.bz2 | |
http://security.ubuntu.com/ubuntu/dists/quantal-security/main/i18n/Translation-en_US | |
http://security.ubuntu.com/ubuntu/dists/quantal-security/main/i18n/Translation-en_US.bz2 |
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 | |
for (my $i = 1; $i <= 100 ; $i++) { | |
my $out = ''; | |
if (($i % 3) == 0) { | |
$out .= 'Fizz'; | |
} | |
if (($i % 5) == 0) { | |
$out .= 'Buzz'; | |
} |
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
evan@evan-desktop: ~ $ git clone evan@10.3.0.77:/home/evan/gitrepo clonedrepo2 | |
Cloning into clonedrepo2... | |
evan@10.3.0.77's password: | |
remote: Counting objects: 3, done. | |
remote: Total 3 (delta 0), reused 0 (delta 0) | |
Receiving objects: 100% (3/3), done. | |
evan@evan-desktop: ~ $ cd clonedrepo2/ | |
evan@evan-desktop: ~/clonedrepo2 $ ls | |
poop | |
evan@evan-desktop: ~/clonedrepo2 $ echo poop2 > poop2 |
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 | |
# | |
use strict; | |
use warnings; | |
#use MP3::M3U::Parser; | |
use MP3::Tag; | |
use Data::Dumper; | |
use File::Copy; |
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
def getDeviceProps(device, propNames): | |
res = '' | |
for i in propNames: | |
res += str(getattr(device, i)) + "\t" | |
return res | |
res = '' | |
#propNames = ('id', 'snmpindex', 'monitor', 'manageIp', 'productionState','preMWProductionState','snmpAgent','snmpDescr','snmpOid','snmpContact','snmpSysName','snmpLocation','snmpLastCollection','snmpAgent','rackSlot','comments','sysedgeLicenseMode','priority','zDeviceTemplates') | |
propNames = ('id','manageIp') |