This file contains hidden or 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/python | |
| import logging, sys, re, getpass, argparse, csv, time, Queue, threading, datetime | |
| from pysphere import MORTypes, VIServer, VITask, VIProperty, VIMor, VIException | |
| from pysphere.vi_virtual_machine import VIVirtualMachine | |
| from threading import Thread | |
| from time import sleep | |
| from Queue import * | |
| class ThreadCloneVM(threading.Thread): | |
| def __init__(self, queue, target, *args): |
This file contains hidden or 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 | |
| SNMPDCONF=/etc/snmp/snmpd.conf | |
| AGENTADDR=" udp:161,udp6:[::1]:161" | |
| ROCOMM="dcbread 128.100.102.151" | |
| SYSLOC="DCB-UCS" | |
| SYSADM="[email protected]" | |
| # installing snmpd and snmp | |
| sudo apt-get install snmpd snmp -y |
This file contains hidden or 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
| @echo off | |
| cls | |
| echo Config_SNMP_VSS 01. | |
| echo "Backing up current SNMP settings" | |
| reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters" /s | |
| pause | |
| cls | |
| echo "Changing to desired settings. Adding 128.100.102.151 / community string dcbread / Syslocation DBC / sysContact [email protected]" | |
| reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters\PermittedManagers" /v 1 /t REG_SZ /d 128.100.102.151 /f | |
| reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters\ValidCommunities" /v dcbread /t REG_DWORD /d 4 /f |
This file contains hidden or 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/sh | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' |
This file contains hidden or 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/bash | |
| # prefix for backups | |
| _today=$(date +"%m-%d-%Y") | |
| _computer_name="tatooine" | |
| # Generate a ssh keypair | |
| ssh-keygen -t rsa -b 4096 | |
| # Requesting Sudo Access from Start |
This file contains hidden or 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 Calcula{ | |
| public static void main(String[] args) { | |
| CalcTiempoDescarga CalculadoraTD = new CalcTiempoDescarga(1024, 0); | |
| CalculadoraTD.calcular(); | |
| System.out.println(CalculadoraTD.getTiempo()); | |
| } | |
| } |
This file contains hidden or 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
| public class CalcTiempoDescarga { | |
| public double sizeMB, speedMBps, timeSec; | |
| public CalcTiempoDescarga(double sizeMB, double speedMBps) { | |
| this.sizeMB = sizeMB; | |
| this.speedMBps = speedMBps; | |
| } | |
| public int calcular() { | |
| this.timeSec = sizeMB / speedMBps, |
This file contains hidden or 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
| abstract class Telefono { | |
| public void call(); | |
| public void callerID(); | |
| public void sms(); | |
| } | |
| public class Nokia3210 extends Telefono { | |
| } |
This file contains hidden or 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
| abstract class Telefono { | |
| public void call(); | |
| public void callerID(); | |
| public void sms(); | |
| } | |
| public class Nokia3210 extends Telefono { | |
| } |
This file contains hidden or 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
| public class CalcTiempoDescarga { | |
| public double sizeMB, speedMBps, timeSec; | |
| public CalcTiempoDescarga(double sizeMB, double speedMBps) { | |
| this.sizeMB = sizeMB; | |
| this.speedMBps = speedMBps; | |
| } | |
| public void calcular() { | |
| this.timeSec = sizeMB / speedMBps * 1024; |
OlderNewer