i've read books about different subjects like management and other theoretical books. All these books have one thing in common ... they all had a shema to remember and to use it as a tool. unfortunately i forget these schema's.
But my idea is to buy a digital photo frame and put the schema's as photo on this photo frame so i will see the shema's between the nice pictures of me.
31 jan 2010
27 jan 2010
scan wifi in the neighborhood
inSSider is a Netstumbler alternative.
Both of the applications use your Wireless Network adapter to scan all the Access Points in your neighborhood. When you experiencing latency on you wifi you use these tools to see what channels are used in the neighborhood. Try to find a channel that is not used or selectt one that is used by the access points far away(week signal)....
You can also use these applications to align antenna's.
Also Xirrus Wi-Fi Inspector is such an application. (didnt test it)
Both of the applications use your Wireless Network adapter to scan all the Access Points in your neighborhood. When you experiencing latency on you wifi you use these tools to see what channels are used in the neighborhood. Try to find a channel that is not used or selectt one that is used by the access points far away(week signal)....
You can also use these applications to align antenna's.
Also Xirrus Wi-Fi Inspector is such an application. (didnt test it)
Sending SMS with GSM modem
i lost the link to the original webpage where i found this.
but it works ....
i used an HUAWEI E160E modem
Imports System.IO.Ports
Public Class SMSSender
Dim WithEvents serialport As New IO.Ports.SerialPort
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public Sub New()
End Sub
Public Sub SendMessage(ByVal SerialPortName As String, ByVal PhoneNumber As String, ByVal TextMessage As String)
If SerialPort.IsOpen Then
SerialPort.Close()
End If
Try
SerialPort.PortName = SerialPortName
SerialPort.BaudRate = 192000
SerialPort.Parity = Parity.None
SerialPort.DataBits = 8
SerialPort.StopBits = StopBits.One
SerialPort.Handshake = Handshake.RequestToSend
SerialPort.DtrEnable = True
SerialPort.RtsEnable = True
SerialPort.NewLine = vbCrLf
SerialPort.Open()
SerialPort.WriteLine("AT+CMGF=1" & vbCr)
System.Threading.Thread.Sleep(200)
SerialPort.WriteLine("AT+CMGS=" & Chr(34) & PhoneNumber & Chr(34) & vbCr)
System.Threading.Thread.Sleep(200)
SerialPort.WriteLine(TextMessage & vbCrLf & Chr(26))
System.Threading.Thread.Sleep(200)
Catch ex As Exception
Finally
SerialPort.Close()
End Try
End Sub
Public Sub GetModes(ByVal SerialPortName As String)
If SerialPort.IsOpen Then
SerialPort.Close()
End If
Dim myline As Object
Try
SerialPort.PortName = SerialPortName
SerialPort.BaudRate = 96000
SerialPort.Parity = Parity.None
SerialPort.DataBits = 8
SerialPort.StopBits = StopBits.One
SerialPort.Handshake = Handshake.RequestToSend
SerialPort.DtrEnable = True
SerialPort.RtsEnable = True
SerialPort.NewLine = vbCrLf
SerialPort.Open()
SerialPort.WriteLine("AT+CMGF=1" & vbCr)
System.Threading.Thread.Sleep(200)
serialport.WriteLine("AT+CMGL=" + Chr(34) + "ALL" + Chr(34) & vbCr)
serialport.WriteLine("AT+CMGL=" + Chr(34) + "REC UNREAD" + Chr(34) & vbCr)
myline = SerialPort.ReadExisting()
Catch ex As Exception
Finally
serialport.Close()
serialport.Dispose()
End Try
End Sub
End Class
If you want to deploy sms for all your users use an smtp2sms gateway
there are plenty on the internet
i did a setup with Network SMS Gateway and took about 5 minutes
enjoy
16 jan 2010
polarization of wireless antenna's
25 aug 2009
comments to files via the windows explorer
the reg file :
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\AllFilesystemObjects]
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell]
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\CommentFile]
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\CommentFile\command]
@="cscript c:\\listdoc.vbs %1"
the vbscript file
LogDirectory = "C:\"
strLogName = "listfile.csv"
nota = InputBox("nota" ,"nota","")
Set args = WScript.Arguments
arg1 = args.Item(0)
Append_File(arg1 & ";" & nota)
' -------------------------------------------------------
' Append_File
' -------------------------------------------------------
Function Append_File(txt_info)
On Error Resume Next
Dim objFileSystem, objOutputFile
Const OPEN_FILE_FOR_APPENDING = 8
strOutPutFile = LogDirectory & strLogName
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
If objFileSystem.FileExists(strOutPutFile) Then
Set objOutputFile = objFileSystem.OpenTextFile(strOutPutFile, OPEN_FILE_FOR_APPENDING)
Else
Set objOutputFile = objFileSystem.CreateTextFile(strOutPutFile, True)
End If
objOutputFile.WriteLine (Now & ";" & txt_info)
objOutputFile.Close
Set objFileSystem = Nothing
End Function
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\AllFilesystemObjects]
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell]
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\CommentFile]
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\CommentFile\command]
@="cscript c:\\listdoc.vbs %1"
the vbscript file
LogDirectory = "C:\"
strLogName = "listfile.csv"
nota = InputBox("nota" ,"nota","")
Set args = WScript.Arguments
arg1 = args.Item(0)
Append_File(arg1 & ";" & nota)
' -------------------------------------------------------
' Append_File
' -------------------------------------------------------
Function Append_File(txt_info)
On Error Resume Next
Dim objFileSystem, objOutputFile
Const OPEN_FILE_FOR_APPENDING = 8
strOutPutFile = LogDirectory & strLogName
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
If objFileSystem.FileExists(strOutPutFile) Then
Set objOutputFile = objFileSystem.OpenTextFile(strOutPutFile, OPEN_FILE_FOR_APPENDING)
Else
Set objOutputFile = objFileSystem.CreateTextFile(strOutPutFile, True)
End If
objOutputFile.WriteLine (Now & ";" & txt_info)
objOutputFile.Close
Set objFileSystem = Nothing
End Function
10 apr 2009
cannot open pdfs behind a watchguard firewall
if you use watchguard firewalls and you use the http proxy for outgoing connections, you can have problems with opening pdf's in internet explorer.
To solve this issue open the wathcguard policy manager.
Click on "setup" in the menu and select for "actions" and choose for "proxies".
Double click on the http client proxy policy.
in the section "HTTP response" select "content types".
pres the add button on the right side of the window.
in the "rule setting" section choose for "exact match" and type in the textbox "multipart/byteranges"
in the "action" section choose for "AV scan" and press the "OK" button.
Save the config and from now on you can pdfs in the internet explorer screen.
you arent the sysadmin of the watchguard?
right click the pdf and save the pdf first on your desktop or install foxit pdf reader (wich is a smaller but faster pdf reader)
To solve this issue open the wathcguard policy manager.
Click on "setup" in the menu and select for "actions" and choose for "proxies".
Double click on the http client proxy policy.
in the section "HTTP response" select "content types".
pres the add button on the right side of the window.
in the "rule setting" section choose for "exact match" and type in the textbox "multipart/byteranges"
in the "action" section choose for "AV scan" and press the "OK" button.
Save the config and from now on you can pdfs in the internet explorer screen.
you arent the sysadmin of the watchguard?
right click the pdf and save the pdf first on your desktop or install foxit pdf reader (wich is a smaller but faster pdf reader)
19 mrt 2009
Automatic Export of XenServers ... more advanced
in my other blog with the backup script for Vm's on xenservers, there you have to use the ip of the xenmaster. but if you play around with your xens then the "master- service" will be moved around between the available xenservers.
so the first script will work until the "master-service" is changed from xenserver.
to counter this problem i've wrote a detection mechanism in vbscript.
The Script can be sheduled with Sheduled tasks in windows. In this way you can make full image backups of your servers in Xen
'-------------------------------------------------------------------------------------
' XENSERVERS CONFIG
'-------------------------------------------------------------------------------------
XENHOST = "" 'IP ADDRESS OF ONE OF YOUR XEN SERVERS
XENUSER = "root"
XENPASS = "qsdqsdsdqsdqsdqs"
VMTOEXPORT = ""
LOGFILE = "C:\XENBACKUP\ExportVm_" + VMTOEXPORT + ".txt"
strCommand = "Xe -s " + XENHOST + " -u " + XENUSER + " -pw " + XENPASS + " pool-list"EXPORTPATH = "E:\xen\"sOutFile = "C:\XENBACKUP\Exceute.cmd"
emailaddress = "email@address.com"
SMTPSERVER = "MAILSERVER"
'-------------------------------------------------------------------------------------
'CHANGE ENVIRONMENT SETTINGS
'-------------------------------------------------------------------------------------
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshEnv = WshShell.Environment("SYSTEM")
WshEnv("Path") = WshEnv("Path") & ";C:\Program Files\Citrix\XenCenter"
VMTOEXPORT = UCase(VMTOEXPORT)
'-------------------------------------------------------------------------------------
' CHECK & CHANGE XENHOST IP TO CONNECT TO MASTER XEN
'-------------------------------------------------------------------------------------
Set objExecObject = WshShell.Exec(strCommand)
Do While Not objExecObject.StdOut.AtEndOfStream
trText = strText + objExecObject.StdOut.ReadLine()
Loop
If Instr(strText, "Master IP address") > 0 Then
XENHOSTs = split (StrText,":")
XENHOST = trim(XENHOSTs(1))
end if
Set objFSO = CreateObject("Scripting.FileSystemObject")
'-------------------------------------------------------------------------------------
' INITIALIZING COMMANDS WITH RIGHT XENHOST-MASTER
'-------------------------------------------------------------------------------------
commands1 = commands1 + "xe -s " + XENHOST + " -u " + XENUSER + " -pw " + XENPASS + " vm-shutdown vm=" + VMTOEXPORT + " >> " + LOGFILE + vbcrlf
commands1 = commands1 + "xe -s " + XENHOST + " -u " + XENUSER + " -pw " + XENPASS + " event-wait class=vm name-label=" + VMTOEXPORT + " power-state=halted >> " + LOGFILE + vbcrlf
commands1 = commands1 + "xe -s " + XENHOST + " -u " + XENUSER + " -pw " + XENPASS + " vm-export filename=" + EXPORTPATH + VMTOEXPORT + ".XVA >> " + LOGFILE + vbcrlf
commands1 = commands1 + "xe -s " + XENHOST + " -u " + XENUSER + " -pw " + XENPASS + " vm-start vm=" + VMTOEXPORT + " >> " + LOGFILE + vbcrlf
commands1 = commands1 + "bmail -s " + SMTPSERVER + " -p 25 -t " + emailaddress + " -f %COMPUTERNAME% -a " + chr(34) + VMTOEXPORT + " export Backup" + chr(34) + " -m " + LOGFILE + vbcrlf commands1 = commands1 + "pause"
If objFSO.FileExists (sOutFile) then
objFSO.DeleteFile (sOutFile)
end if
Append_File (commands1)
If objFSO.FileExists (sOutFile) then
RunApp(sOutFile)
end if
'-------------------------------------------------------------------------------------
' RUN ROUTINE
'-------------------------------------------------------------------------------------
Sub RunApp(ByVal sFile)
On Error Resume Next
objShell.Run sFile , 1, true
If Err.Number = 0 Then
Else
wscript.Echo "error" + Err.Number
End If
On Error GoTo 0
End Sub
'-------------------------------------------------------------------------------------'
LOGFILE FUNCTION
'-------------------------------------------------------------------------------------
Function Append_File (txt_info)
on Error Resume Next
Dim objFileSystem, objOutputFile
Const OPEN_FILE_FOR_APPENDING = 8
strOutputFile = sOutFile
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
If objFileSystem.FileExists(strOutputFile) Then
Set objOutputFile = objFileSystem.OpenTextFile(strOutputFile, OPEN_FILE_FOR_APPENDING)
else
Set objOutputFile = objFileSystem.CreateTextFile(strOutputFile , True)
End If
objOutputFile.WriteLine(txt_info)
objOutputFile.CloseSet
objFileSystem = Nothing
end Function
so the first script will work until the "master-service" is changed from xenserver.
to counter this problem i've wrote a detection mechanism in vbscript.
The Script can be sheduled with Sheduled tasks in windows. In this way you can make full image backups of your servers in Xen
'-------------------------------------------------------------------------------------
' XENSERVERS CONFIG
'-------------------------------------------------------------------------------------
XENHOST = "
XENUSER = "root"
XENPASS = "qsdqsdsdqsdqsdqs"
VMTOEXPORT = "
LOGFILE = "C:\XENBACKUP\ExportVm_" + VMTOEXPORT + ".txt"
strCommand = "Xe -s " + XENHOST + " -u " + XENUSER + " -pw " + XENPASS + " pool-list"EXPORTPATH = "E:\xen\"sOutFile = "C:\XENBACKUP\Exceute.cmd"
emailaddress = "email@address.com"
SMTPSERVER = "MAILSERVER"
'-------------------------------------------------------------------------------------
'CHANGE ENVIRONMENT SETTINGS
'-------------------------------------------------------------------------------------
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshEnv = WshShell.Environment("SYSTEM")
WshEnv("Path") = WshEnv("Path") & ";C:\Program Files\Citrix\XenCenter"
VMTOEXPORT = UCase(VMTOEXPORT)
'-------------------------------------------------------------------------------------
' CHECK & CHANGE XENHOST IP TO CONNECT TO MASTER XEN
'-------------------------------------------------------------------------------------
Set objExecObject = WshShell.Exec(strCommand)
Do While Not objExecObject.StdOut.AtEndOfStream
trText = strText + objExecObject.StdOut.ReadLine()
Loop
If Instr(strText, "Master IP address") > 0 Then
XENHOSTs = split (StrText,":")
XENHOST = trim(XENHOSTs(1))
end if
Set objFSO = CreateObject("Scripting.FileSystemObject")
'-------------------------------------------------------------------------------------
' INITIALIZING COMMANDS WITH RIGHT XENHOST-MASTER
'-------------------------------------------------------------------------------------
commands1 = commands1 + "xe -s " + XENHOST + " -u " + XENUSER + " -pw " + XENPASS + " vm-shutdown vm=" + VMTOEXPORT + " >> " + LOGFILE + vbcrlf
commands1 = commands1 + "xe -s " + XENHOST + " -u " + XENUSER + " -pw " + XENPASS + " event-wait class=vm name-label=" + VMTOEXPORT + " power-state=halted >> " + LOGFILE + vbcrlf
commands1 = commands1 + "xe -s " + XENHOST + " -u " + XENUSER + " -pw " + XENPASS + " vm-export filename=" + EXPORTPATH + VMTOEXPORT + ".XVA >> " + LOGFILE + vbcrlf
commands1 = commands1 + "xe -s " + XENHOST + " -u " + XENUSER + " -pw " + XENPASS + " vm-start vm=" + VMTOEXPORT + " >> " + LOGFILE + vbcrlf
commands1 = commands1 + "bmail -s " + SMTPSERVER + " -p 25 -t " + emailaddress + " -f %COMPUTERNAME% -a " + chr(34) + VMTOEXPORT + " export Backup" + chr(34) + " -m " + LOGFILE + vbcrlf commands1 = commands1 + "pause"
If objFSO.FileExists (sOutFile) then
objFSO.DeleteFile (sOutFile)
end if
Append_File (commands1)
If objFSO.FileExists (sOutFile) then
RunApp(sOutFile)
end if
'-------------------------------------------------------------------------------------
' RUN ROUTINE
'-------------------------------------------------------------------------------------
Sub RunApp(ByVal sFile)
On Error Resume Next
objShell.Run sFile , 1, true
If Err.Number = 0 Then
Else
wscript.Echo "error" + Err.Number
End If
On Error GoTo 0
End Sub
'-------------------------------------------------------------------------------------'
LOGFILE FUNCTION
'-------------------------------------------------------------------------------------
Function Append_File (txt_info)
on Error Resume Next
Dim objFileSystem, objOutputFile
Const OPEN_FILE_FOR_APPENDING = 8
strOutputFile = sOutFile
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
If objFileSystem.FileExists(strOutputFile) Then
Set objOutputFile = objFileSystem.OpenTextFile(strOutputFile, OPEN_FILE_FOR_APPENDING)
else
Set objOutputFile = objFileSystem.CreateTextFile(strOutputFile , True)
End If
objOutputFile.WriteLine(txt_info)
objOutputFile.CloseSet
objFileSystem = Nothing
end Function
Abonneren op:
Posts (Atom)