def cMil(a):
a = a.upper()
if a == ' ':
b = ''
if a == 'A':
b = 'Alpha'
if a == 'B':
b = 'Bravo'
if a == 'C':
b = 'Charlie'
if a == 'D':
b = 'Delta'
if a == 'E':
b = 'Echo'
if a == 'F':
b = 'Foxtrot'
if a == 'G':
b = 'Golf'
if a == 'H':
b = 'Hotel'
if a == 'I':
b = 'India'
if a == 'J':
b = 'Juliet'
if a == 'K':
b = 'Kilo'
if a == 'L':
b = 'Lima'
if a == 'M':
b = 'Mike'
if a == 'N':
b = 'November'
if a == 'O':
b = 'Oscar'
if a == 'P':
b = 'Papa'
if a == 'Q':
b = 'Quebec'
if a == 'R':
b = 'Romeo'
if a == 'S':
b = 'Sierra'
if a == 'T':
b = 'Tango'
if a == 'U':
b = 'Uniform'
if a == 'V':
b = 'Victor'
if a == 'W':
b = 'Whiskey'
if a == 'X':
b = 'X-Ray'
if a == 'Y':
b = 'Yankee'
if a == 'Z':
b = 'Zulu'
if a == '0':
b = 'Zero'
if a == '1':
b = 'One'
if a == '2':
b = 'Two'
if a == '3':
b = 'Three'
if a == '4':
b = 'Four'
if a == '5':
b = 'Five'
if a == '6':
b = 'Six'
if a == '7':
b = 'Seven'
if a == '8':
b = 'Eight'
if a == '9':
b = 'Nine'
return b
phrase = raw_input('What phrase do you want translated to Phonetic Speak?\n')
print '\n'
len1 = len(phrase)
#print('Length of phrase is', len1)
range = (len1 - 1)
cnt = 0
while (cnt <= range):
print(cMil(phrase[cnt]))
cnt = cnt + 1
g o a t m a l e .c o m
IT and bullshit in the USA
Thursday, August 16, 2012
Phonetic Phrase Translator (Python)
I thought that I would noodle around in Python this morning, and I had a lot of fun making this dumb program, but basically it takes a phrase that you input and converts it to a fancy "military style" phonetic phrase.. It's useful when you talk to tech support and you need to give them a serial number or other long phrase.
Pretty simple stuff, the cMil function takes 'a' and converts each char to uppercase and then returns 'b' The cMil function is called from a while loop, using the counter (cnt) in the array format to pass each character. The range is the "len" (lenght)of the phrase, minus 1, as the counting starts at zero. (Remember that if "test" was the phrase, 0,1,2,3 is four numbers! and test[3] is 't' and not 's')
Thursday, August 9, 2012
NAT, Port forwarding, etc.
http://www.dd-wrt.com/wiki/index.php/Port_Forwarding
Pretty solid and easy to understand summary of NAT, IPv4, and port forwarding. Probably the most "explain it like i'm five" summary of basic networking concepts. I would love to see something like this for IPv6.
DD-WRT's documentation is on point.
Pretty solid and easy to understand summary of NAT, IPv4, and port forwarding. Probably the most "explain it like i'm five" summary of basic networking concepts. I would love to see something like this for IPv6.
DD-WRT's documentation is on point.
Wednesday, July 11, 2012
Power Shell - Hyper-V
I'm an utter noobcake when it comes to Powershell. I have no idea how to work it.
Honestly.
But I did figure a bit out this morning that made my tiggles wiggle.
Like an idiot, I opened up regular old windows powershell and unsuccessfully smashed in hyper-v commands. Took me a few minutes to realize I have to open up the Virtual Machine Manager one under "Programs\Microsoft System Center\Virtual Machine Manager 2008 R2"
From there I was able to craft some magic in a matter of minutes.
First you have to set the Host server you're going to work with using the "Get-VMMServer" command. I used "Get-VMMServer localhost"
Then I wanted to use the Get-VM command to dump the Hyper-V VM's server and Hyper-V names.
I was able to do a simple "Get-VM | Select-Object ComputerName,Name" and output that to fancy console output, which if you know anything you can pipe with a simple carrot to a text document like so.
"get-vm | Select-Object ComputerName,Name > C:\library\names.txt"
Bam! look, powershell can do shit!
Wednesday, May 30, 2012
Wednesday, May 23, 2012
Command to disable IE9
Here is the command to disable IE9.
Add it to startup scripts, MDT deployments, etc.
In typical Microsoft fashion they have created an entire toolkit to accomplish one command.reg add "HKLM\SOFTWARE\Microsoft\Internet Explorer\Setup\9.0" /v DoNotAllowIE90 /t REG_DWORD /d 1 /f
Add it to startup scripts, MDT deployments, etc.
Thursday, May 17, 2012
Trend Micro Office Scan Not updating when Roaming
Ran into an issue today where Office Scan 10.6 (on our DMZ) was not updating automatically. It was really annoying having to right click on the icon and select update now on each of our "roaming" servers. Working with Trend Micro support was grueling, but they eventually figured it out. First, they tried to use the SUCtool (found in the \\trendserver\ofcscan\Admin\Utility\ClientPackager none such luck. They reviewed the hell out of the registry and found that the Schedule Update tool did not change the right entries.
We had to open up HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro\PC-CLLINNTCORP\CurrentVersion\Schedule Update\ and set the ScheduleUpdateInterval REG_DWORD key to how ever many seconds we wanted it (3600 for hourly) make sure to select the decimal option unless you know the hex value of 3600 (e10) for some god forsaken reason. Hope this helps.
*Edit* It looks like every time a scheduled update runs, it sets the values back to zero. So what you have to do is make a script to push out these two registry keys and then make a scheduled task to run that script. It's absolutely retarded.
*Edit* It looks like every time a scheduled update runs, it sets the values back to zero. So what you have to do is make a script to push out these two registry keys and then make a scheduled task to run that script. It's absolutely retarded.
Friday, May 4, 2012
Block IE9
Microsoft has a tool to block ie9
if you by any chance you accidentally installed the beast you can uninstall it from the "View installed updates" window in "Programs and Features"
And if you want to remove IE8 or IE9 all together you can uninstall it from "Turn Windows features on or off"
Just make sure you have another browser installed.
Subscribe to:
Posts (Atom)