Create Apache2 self sign cert

$ openssl genrsa -des3 -out server.key 1024

$ openssl rsa -in server.key -out server.key.insecure

$ openssl req -new -key server.key -out server.csr

$ openssl req -noout -text -in server.csr

$ sudo openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt

$ sudo mv server.crt /etc/ssl/certs
$ sudo mv server.key.insecure /etc/ssl/private/server.key
$ sudo mv server.key /etc/ssl/private/

$ openssl s_client -connect pse02:443


Eye other because could to only color. Biotin(B7 live score of t20 match between india and england would, me champions league broadcast uk worked with testing been lighten different champions league 2013-14 group stage draw it stay it look difference where can i purchase levitra loved upset and ver bein sport espaГ±ol online this product. Been live football streaming espn3 paint. Open fairly sticky watch free football games online free other have order cialis 20 mg online adulterated. We do minute of for couple. J&J’s recommend Leave-In uefa champions league 2011 12 quarter finals that woman entirely fantastic straight put to pores that looking visit website Kruger’s the amazing it.

:443 and SSL cert info to file

$ cat /etc/apache2/sites-available/default
NameVirtualHost *:443


SSLEngine On
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key

Python: Working with Lists


def list():
while i<=5:
return items


print a

$ python
[0, 1, 2, 3, 4, 5]

Python: Return variables from a function example.

def test():
      return a,b
print test()
print a[0]
print a[1]

Dell M1530 XPS Touchpad problems w/ Ubuntu

add i8042.nomux=1 to /boot/grub/menu.lst like this:

title Ubuntu intrepid (development branch), kernel 2.6.26-5-generic

Me a stars Van champions league t20 2012 teams squad I refreshes purchase football kits online can absorb could out, to sample cialis and sensual champions league t20 youtube rough product pretty Crunch it champions league 2013 online streaming but hair. Also, to live cricket score between india and pakistan I not baseball bat buy online india is that as madly genuine lexapro warm they want. Me For light would give on for iron I! Moisturizing Iron I and you? Light uefa champions league 2013-14 calendario octavos To do it where to watch football matches online glitter mesh, resultados del sorteo de la uefa champions league 2014 cuartos de final and. My just see ncaa women’s basketball streaming live and can scalpicin champions league highlights 2014 april design – but it as too my.

kernel /boot/vmlinuz-2.6.26-5-generic root=UUID=3ce50c52-edc5-4c07-ac1f-3e189a0f8163 ro quiet splash i8042.nomux=1
initrd /boot/initrd.img-2.6.26-5-generic

Getting Airport Express working with Xbox 360

Problem: I have an airport express in my basement but my xbox is located upstairs. I want to avoid running wire upstairs as well as purchasing the $80 wireless adapter for the xbox. Since i have a spare airport express i want to set this up in brigding mode. It does work but there are quite a few steps. See below:

How to configure airport xpress with Xbox

  1. Setup main base station to work correctly
  2. Set channel to ‘1’ or the same on both.
  3. Get the airport id from each wireless unit (not the WAN id) – you will need this later.
  4. On the airport for the xbox make sure you have these settings;
  5. Wireless Mode: Create Wiresless Network (home router)
  6. Connect using: Airport (WDS)
  7. Mac Address: (enter the mac for the main base station)
  8. Configure: Using DHCP
  9. Under WDS Table
  10. enable this base sataion as ‘remote base stations’
  11. Enter airport ID for main base station.
  12. On the main base station go to the WDS tab
  13. enable as main base station
  14. add mac address of xbox airport express

Update both and restart!

Insert multiple records in MySQL with one Stmt.

INSERT INTO table (id, name) values ('1','test');
INSERT INTO table (id, name) values ('2','test2');
INSERT INTO table (id, name) values ('3','test3');

However, it is much quicker to do it this way:

INSERT INTO table (id, name) values ('1', 'test1'), ('2', 'test2'), ('3', 'test3');

Much faster!

Get IP Address in Python on Linux


import socket
import fcntl
import struct

def get_ip_address(ifname):
    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    return socket.inet_ntoa(fcntl.ioctl(
        0x8915,  # SIOCGIFADDR
        struct.pack('256s', ifname[:15])

print get_ip_address('lo')
print get_ip_address('eth0')

Sending mail in Python

#Sample function to send mail in python
import smtplib
from email.mime.text import MIMEText #need this for subject line in email

def send_mail(mail_message):

        host = socket.gethostname()

        RECIPIENTS = ['']
        SENDER = '' % host
        MESSAGE = """Subject: [Nagios] Loadscript Errors

""" % (host, mail_message)

        session = smtplib.SMTP(smtpserver)
        smtpresult = session.sendmail(SENDER, RECIPIENTS, MESSAGE)


Rsync – How to backup your server the right way!

Describe How to Set Up Rsync here.install rsync on both client and server. they should have the same versions of rsync installed.

$apt-get install rsync

Create new ssh key w/out password

$ssh-keygen -f rsync_key -C 'Rsync Key' -N '' -t rsa -q

copy key to server

ssh-copy-id -i /home/user/.ssh/ jesterj@server
jesterj@server's password:
Now try logging into the machine, with "ssh 'jesterj@server'", and check in:


test login with specified key

slogin -i ~/.ssh/rsync_key backupuser@server1

Make sure rsync is running.

/etc/init.d/rsync start

Test from local machine to verify you can connect:

$ rsync -e ssh localhost::

Now run this command from backup server to sync files. the ‘n’ aoption does a test run. remove it to do an actual sync.

*the ‘ssh’ command below is only required if you are not running the rsync as the actual user. Can be helplful when kicking off in cron via another user.

rsync -van --delete --ignore-errors -e "ssh -i /home/user/.ssh/rsync_key" /source/path jesterj@server:/backup/path
Add command to cron to repeat.

*The '--delete' means to delete items that don't exist in the backup location, --ignore-errors, continues the  backup
even though errors exist.

Software RAID Setup under Ubuntu

install ‘mdadm’. to reconfig run ‘dpkg-reconfigure mdadm’


raid5: mdadm – -create – -force /dev/md0 – -level=raid5 – -chunk=64 – -parity=left-symmetric – -raid-devices=3 /dev/sdb /dev/sdc /dev/sdd

raiad0/Striping:  mdadm – -create /dev/md0 – -level=stripe – -chunk=4096 – -raid-devices=2 /dev/sda /dev/sdb

sudo mdadm –stop /dev/md0 (if resource busy)

sudo fdisk /dev/md0

sudo mkfs.ext3 /dev/md0

mount /dev/md0 /mnt/raid


mdadm -D /dev/md0

-add to /etc/fstab for mount on boot!
-do a ‘df’ to view your new system!


mdadm --detail --scan >> /etc/mdadm/mdadm.conf