Friday, February 15, 2013

Limit Internet Bandwidth Usage (internet speed) in Ubuntu

#> sudo apt-get install wondershaper
#> sudo wondershaper eth0 1024 256

this will limit the download speed to 1024 Kbps and upload to 256 Kbps. Remember that this limit is for all internet traffic i.e torrent, ftp, browsing and any thing else.

If you want to remove these limits use

#> sudo wondershaper clear eth0

again replacing eth0 with your interface name


Friday, February 1, 2013

How to clone git repo from existing Hero app

1- Make sure you have Heroku account.
2- Install the Heroku toolbelt. Google it yourself!...
3- Open a terminal, and to login to heroku
#> heroku login
4- Generate you key
#>; ssh-keygen -t rsa 
5- Add the key to your heroku 
#> heroku keys:add
6- Clone your existing repo.
#> git clone git@heroku.com:.git

Clone git repo from Heroku

1- Make sure you have Heroku account.
2- Install the Heroku toolbelt. Google it yourself!...
3- Open a terminal, and to login to heroku
<code>
#> heroku login
</code>
4- Generate you key
<code>
#> ssh-keygen -t rsa 
</code>
5- Add the key to your heroku 
<code>
heroku keys:add
</code>
6- Clone your existing repo.
<code>
git clone git@heroku.com:<YOUR-APPNAME>.git
</code>

Monday, September 3, 2012

Friday, August 10, 2012

Simple File Upload to Amazon S3 From Ruby

    #!/usr/bin/env ruby    require 'rubygems'  require 'aws/s3'    local_file = ARGV[0]  bucket = ARGV[1]  mime_type = ARGV[2] || "application/octet-stream"    AWS::S3::Base.establish_connection!(    :access_key_id     => 'REPLACE_ME',    :secret_access_key => 'REPLACE_ME'  )    base_name = File.basename(local_file)    puts "Uploading #{local_file} as '#{base_name}' to '#{bucket}'"    AWS::S3::S3Object.store(    base_name,    File.open(local_file),    bucket,    :content_type => mime_type  )    puts "Uploaded!"

Proxmox installation display out of range

Reference:  https://forum.proxmox.com/threads/proxmox-ve-screen-out-of-range.131297/