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
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsite.com', 'http://www.newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldsite.com','http://www.newsite.com'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldsite.com', 'http://www.newsite.com'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.oldsite.com', 'http://www.newsite.com'); |
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
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; |
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
abstract class Telefono { | |
public void call(); | |
public void callerID(); | |
public void sms(); | |
} | |
public class Nokia3210 extends Telefono { | |
} |
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
abstract class Telefono { | |
public void call(); | |
public void callerID(); | |
public void sms(); | |
} | |
public class Nokia3210 extends Telefono { | |
} |
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
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 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 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 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 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 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 |