Its been a long time since I gave away anything so here are 40 vector hearts done with love. Took like 4 hours using Inkscape (http://inkscape.org/), so feel free to use them in any way you want! More importantly, Enjoy using them
As usual they are zipped so download and extract! Each heart is in a separate svg file named sequentially. For reference you can use 40hearts.png or 40hearts.svg.
Download File 40hearts.zip (920.2 KB)
A weekend project:
A small script to download/clone cakephp repo to start a new project. The upgrade/status option needs more tweaking around.
Project Hosted in Github: https://github.com/Maldicore/cakein
A vector of Little Mermaid Arial, free for you to use in any fashion that you want. This Vector is done in Open Source illustration software InkScape!
Here is the source svg file compressed in zip format : arial.svg
Well, I do a lot of testing and developing of/with web application. Mostly testing of Web Softwares and plugins requires mail functionality, for example self-service password forgot function and others. Using ISPs smtp server for these is rather difficult at times and some requires hacking the code. Setting up a local mail transfer agent (mta) has become a top most requirement. I use Ubuntu Linux and the default seems to be sendmail but I have been struggling to setup sendmail as a smarthost (to use gmail to relay emails). The configuration was harder than I thought. So I switched to postfix and was able to setup a local mail server within minutes. Here follows the setups for my future references and for anyone who need this.
1. Install postfix and certificates
sudo apt-get install postfix libsasl2-2 libsasl2-modules ca-certificates
In the install wizard that follows select Internet with smarthost and add [smtp.gmail.com]:587 as the relayhost
inet_interfaces = all
mydestination = mail.yusufge.local, yusuf-ET1665, localhost.localdomain, localhost
home_mailbox = Maildir/
Just below the line that says relayhost = [smtp.gmail.com]:587
add the following
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/gmail_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_use_tls = yes
3. Add SMTP authenticating user/password and adjust the file
As sudo create and add the following to /etc/postfix/gmail_passwd
Next adjust the permission of this newly created file
sudo chmod 700 /etc/postfix/gmail_passwd
Also translate this file to a db file that postfix can understand
sudo postmap /etc/postfix/gmail_passwd
4. Restart the postfix
sudo /etc/init.d/postfix restart
With the above 4 step your local mail server will be up and running so let us test it. In the terminal:
telnet localhost smtp
Connected to localhost.
Escape character is ‘^]’.
220 yusuf-ET1665 ESMTP Postfix (Ubuntu)
250 2.1.0 Ok
250 2.1.0 Ok
354 End data with
250 2.0.0 Ok: queued as DCB0717E0141
221 2.0.0 Bye
Connection closed by foreign host.
Instead of yusuf, use your box username or a valid email address above in the mail from: and rcpt to:, but if you use any other name than the gmail account that you authenticated with, it will end up as spam or rejected by some mail severs.
Also note, do not use this for high traffic servers, only recommended for home based setup for testing. In addition, the Google account that you use will store all outgoing messages (via Internet) in the Google Send Mail folder!
As for in my testing, the mail will end up in the following folder at: /home/yusuf/Maildir/new
To check the content of the file type cat the file (you can use tab key auto complete)
Received: from localhost (localhost [127.0.0.1])
by yusuf-ET1665 (Postfix) with ESMTP id DCB0717E0141
Date: Fri, 23 Sep 2011 00:56:51 +0500 (MVT)
The nation is mourning on the loss of 4 students and the principal of Hiriyaa School in a drowning accident. After some time out with a friend I decided to spend the day indoor. When at home and with my computer can’t help, but get productive. So I decided to do a little experiment for a download manager that we are working on. Here is a ruby experimental script that can download YouTube Videos. Working as of September 9, 2011 but YouTube changes a lot so let me know when this breaks.
Note this a rough script, so feel free to improve.
youtubepath = 'http://www.youtube.com/watch?v=6tWLqFmaNdQ'
uri = URI.parse(youtubepath)
open(uri) do |file|
openedsource = file.read
# search for the title
rgtitlesearch = Regexp.new(/\<meta name="title" content=.*/)
vidtitle = rgtitlesearch.match(openedsource)
vidtitle = vidtitle.gsub("<meta name=\"title\" content=\"","").gsub("\">","").gsub(/ /,'')+".flv"
# search for the download link
rglinksearch = Regexp.new(/,url=.*\\u0026quality=/)
vidlink = rglinksearch.match(openedsource)
vidlink.split(",url=").each do |foundlinks|
vidlink = foundlinks.gsub(",url=","").gsub("\\u0026quality=","").gsub("%3A",":").gsub("%2F","/").gsub("%3F","?").gsub("%3D","=").gsub("%252C",",").gsub("%253A",":").gsub("%26","&")
def download vidlink, vidfile
writeOut = open(vidfile, "wb")
puts "Download Done!"
Things missing and you might want to improve…
- Easier YouTube link inputs
- Assign Video Type (mp4, flv, etc) and Quality
- Download Progress Bar
- Clean up the code, including remove dups