Skip to content

Instantly share code, notes, and snippets.

View ChrisMoney's full-sized avatar

Chris Weathers ChrisMoney

  • Onevested
  • St. Louis, MO
View GitHub Profile
@ChrisMoney
ChrisMoney / showHide_menu.js
Created February 15, 2012 15:16
Javascript - Show/Hide Menu
<script langauge = "text/javascript">
// Show Hide Menu
function hide(editMenu)
{
var element = document.getElementById(editMenu);
element.style.visbility = "hidden";
}
function show(editMenu)
{
@ChrisMoney
ChrisMoney / check_install.bat
Created February 15, 2012 15:20
Batch/Dos -- check for and install program
//CheckFor_And_Install_Program
@echo off
:: This batch file was built on Win95 and NT, so probably works
:: on everything. Run it with no arguments to see built-in help.
:: It depends heavily on the commands DEBUG, PING, and ARP.
:: It generates lots of temporay files all with names like "~temp"
:: Check for argument
if [%1]==[] goto NOARG
@ChrisMoney
ChrisMoney / find_expiredHost.bat
Last active November 30, 2016 20:28
Batch DOS -- Find expired host
//Find expired host
@echo off
:: Test to see if we are on Win 9x by how ampersands are handled
> HostsExpired.tmp echo 1234&rem
type HostsExpired.tmp | find "rem" > nul
if errorlevel 1 goto NOT9X
goto ISWIN9X
@ChrisMoney
ChrisMoney / find_serverIP.bat
Created February 15, 2012 15:23
Batch/DOS --Find Server IP
//Find Server IP
@echo off
:: This batch file was built on Win95 and NT, so probably works
:: on everything. Run it with no arguments to see built-in help.
:: It depends heavily on the commands DEBUG, PING, and ARP.
:: It generates lots of temporay files all with names like "~temp"
:: Check for argument
if [%1]==[] goto NOARG
@ChrisMoney
ChrisMoney / ftp_scripting.bat
Created February 15, 2012 15:24
Batch/DOS -- FTP Scripting
//FTP Scripting
Get yourself a DOS prompt, type FTP and hit Enter. You've found
the built-in command-line FTP program that ships with every copy
of Windows 95 and NT! That means it's the only thing you KNOW will
be on someone else's computer. But talking someone through how to
use FTP is messy. If you need to help someone else out, you're
better off automating the whole process by supplying them with an
FTP "script". If you need to learn more about FTP, read on and go
photocopy the FTP section out of a UNIX or LINUX book.
@ChrisMoney
ChrisMoney / logger.bat
Created February 15, 2012 15:25
Batch/DOS --Logger Script
//Logger Program
@echo off
:: This batch file was built on Win95 and NT, so probably works
:: on everything. Run it with no arguments to see built-in help.
:: It depends heavily on the commands DEBUG, PING, and ARP.
:: It generates lots of temporay files all with names like "~temp"
:: Check for argument
if [%1]==[] goto NOARG
@ChrisMoney
ChrisMoney / network_scan.bat
Created February 15, 2012 15:25
Batch/DOS --Network Scan
//Network Scan Program
@echo off
>> report.txt echo *******************************************************************************
>> report.txt echo *******************************************************************************
>> report.txt echo *******************************************************************************
>> report.txt echo.
>> report.txt echo.
set /p userdata=Enter notes for this location:
>> report.txt echo %userdata%
@ChrisMoney
ChrisMoney / ping_computers.bat
Created February 15, 2012 15:26
Batch/DOS -- Pings all live computers
//Ping All Live Computers
@echo off
:: This batch file was built on Win95 and NT, so probably works
:: on everything. Run it with no arguments to see built-in help.
:: It depends heavily on the commands DEBUG, PING, and ARP.
:: It generates lots of temporay files all with names like "~temp"
:: Check for argument
if [%1]==[] goto NOARG
@ChrisMoney
ChrisMoney / save_username_pass.bat
Created February 15, 2012 15:27
Batch/DOS -- Save username and password
//Save UserName And Password
@echo off
:: This batch file will create an HTML Application (HTA).
:: Values entered in the HTA will be saved as %TEMP%\USERIN.BAT
:: After the USERIN.BAT is CALLed from the main batch
:: (and assuming there is enough room in the environment)
:: environmental variables USERNAME and PASSWORD will be set.
:: It is your responsibility to delete the USERIN.BAT
:: after you CALL it. Because this batch file needs to
@ChrisMoney
ChrisMoney / subroutine.bat
Created February 15, 2012 15:28
Batch/DOS -- Subroutine
//Subroutines
@echo off
if not exist %0 goto ERROR
if not "%1"=="" goto %1
:MAIN
call %0 ECHOHI
call %0 ECHOBYE
goto DONE