Make EMC Retrospect Email on Events
Code September 15th, 2009 by Shai Perednik
EMC Retrospect 7.6 has a built email notification option. However, its premetive and doesn’t allow for custom messages, alternate ports, or TLS/SSL.
So after much digging and hacking I through together the script below which does the job. This is based on the example vbs script supplied by retrospect, so cudos to them for the initial work.
Download retroeventhandler.vbs
Also, note that you will need to change your settings according in the last part of the script.
Related posts:Tags: backup, blockquote, email, emc, event handler, Information, IO, Mac, Microsoft, retrospect, script, ssl, tls, XP
Enable mod_rewrite in APACHE
Code August 21st, 2009 by Shai Perednik
With all the hullabaloo lately relating to tr.im’s closure and reopening most people are opting to setup their own shortning service.
There’s Lessn and Yourls. Both are great but Yours takes the cake for the admin panel and more detailed info. I followed the LifeHacker Tutorial, but couldn’t get mod_rewrite working. With the help of this post I figured it out.
change the following line in /etc/apache2/sites-enabled/000-default
DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride all </Directory> <Directory /var/www/> Options FollowSymLinks AllowOverride all Order allow,deny allow from all </Directory>
then restart apache
sudo /etc/init.d/apache2 restart
Theres also a bookmarklet for Yourls from twitter.com/jarbro but I’m still working on getting past the “Unknown” error.
UPDATE: The unknown error is normal. You just need to drag the links to the bookmark bar.
I have to install php5-curl just to get the curl_init() function installed
sudo apt-get php5-curl
sudo /etc/init.d/apache2 restart
Hopefully this helps someone
Tags: apache, blockquote, Bookmarklet, CURL, IO, mod_rewrite, php, Sudo, tr.im, Ubuntu
Get “real” IP address with vb .net?
Code August 14th, 2009 by Shai Perednik
I saw this post @ stackoverflow.com, I was trying to do the same. So I thought I’d post a complete solution. See this link above or the code below
To Combine the answers above”
Create a php file and paste this in it:
<?php
echo $_SERVER['REMOTE_ADDR'];
?>
save it as curip.php and upload it to your server.
In your VB.net project create a module.
Declare the imports section at the very top
Imports System.Net
Imports System.IO
And create your function:
Public Function GetIP() As String
Dim uri_val As New Uri(“http://yourdomain.com/curip.php”)
Dim request As HttpWebRequest = HttpWebRequest.Create(uri_val)
request.Method = WebRequestMethods.Http.Get
Dim response As HttpWebResponse = request.GetResponse()
Dim reader As New StreamReader(response.GetResponseStream())
Dim myIP As String = reader.ReadToEnd()
response.Close()
Return myIP
End Function
Now anywhere in your code you can issue
Dim myIP = GetIP()
and use the value from there as you wish.
Tags: blockquote, IO, module, php, vb.net
JavaScript MailTo Link Generator
Code July 13th, 2009 by Shai Perednik
Very usefull javascript generator for creating complex mailto links.
jsCode.com :: JavaScript MailTo Link Generator.
Related posts:Tags: email, Javascript, mailto
VB.NET – Date Time Picker – How Can I Choose BOTH A Date And A Time?
Code July 8th, 2009 by Shai Perednik
The dateTimePicker can indeed do time. Hence the name
Just change the Format property to time, and the ShowUpDown to True.
Either in the editor, or in code like
CODE
dateTimePicker1.Format = Time
dateTimePicker1.ShowUpDown = True
via VB.NET – Date Time Picker – How Can I Choose BOTH A Date And A Time? | DreamInCode.net.
Related posts:Tags: vb.net
Good Coding Practices
Code June 19th, 2009 by Shai Perednik
Reading through some coding expamples I came upon this well commented code. The info is in XML format and makes perfect sence for any reader.
I’m going to start using this method from now on.
VB.net
''' <summary>
''' Checks to see if a table exists in Database or not.
''' </summary>
''' <param name="tblName">Table name to check</param>
''' <param name="cnnStr">Connection String to connect to</param>
''' <returns>Works with Access or SQL</returns>
''' <remarks></remarks>
PHP
//<summary>
//checks to see if a table exists in Database or not.
//</summary>
//<param name="tblName">Table name to check</param>
//<param name="cnnStr">Connection String to connect to</param>
//<returns>Works with Access or SQL</returns>
//<remarks></remarks>
via CodeProject: Check if a table or field exists in a database. Free source code and programming help.
Related posts:Tags: XP

