Keyboard shortcuts on Lubuntu
Unfortunately LXDE doesn’t have option to edit shortcuts by default, but it’s easily can be done by editing some xml file sudo leafpad ~/.config/openbox/lubuntu-rc.xml <!– Lock the screen on Ctrl + Alt + f–> <keybind key=”C-A-f”> <action…
Setting up environment (mongodb, sun-java7) (lubuntu, ubuntu, xubuntu)
MongoDB Create separate file install_mongodb.sh and put apt-key adv –keyserver keyserver.ubuntu.com –recv 7F0CEB10 echo “deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen” | tee -a /etc/apt/sources.list.d/10gen.list apt-get -y update apt-get -y install mongodb-10gen and run sudo install_mongodb.sh Sun-java 7 sudo…
Getting mysql socket address
mysqladmin variables | grep socket will give you something like: | socket | /var/run/mysqld/mysqld.sock
Format flash drive from terminal
First of all type the below command for know the name of your pen dmesg | tail Then unmount your pen drive using the following command. sudo umount /dev/sdb1 Then enter the following command to…
Working with Heroku (tips)
To reset DB in Heroku run: heroku pg:info you will get something like === HEROKU_POSTGRESQL_ONYX_URL (DATABASE_URL) then run: heroku pg:reset HEROKU_POSTGRESQL_ONYX_URL To see live logs, just run: heroku logs -t To access console: heroku run…
Simple Server/Client on ruby eventmachine
require ‘eventmachine’ class EchoClient < EM::Connection def initialize(user) @user = user end def post_init puts “connected” send_data “Hello from #{@user}” end def unbind puts “disconnected” end def receive_data(data) puts “received #{data}” close_connection EM.stop end end…
Testing API with Cucumber & HTTParty
Recently was testing on of API using Cucumber&HTTParty, here’a a note: Feature: Book list In order to get a list of cool books I need some of them Scenario: List book Given the following books…
Dump mysql database from remote server
mysqldump -h <your-port> -u <username> -p <database-name> –single-transaction > dump.sql
Sopcast P2P TV on Ubuntu
Install Sopcast Internet P2P Television in Ubuntu 10.10 “Maverick Meekrat” sudo add-apt-repository ppa:ferramroberto/sopcast sudo apt-get update sudo apt-get install sopcast-player
Hirb formatter for irb/rails c
To install hirb, just type gem insatll hirb Then create .irbrc file under your home directory touch ~/.irbrc Then place this piece of code there: require ‘hirb’ extend Hirb::Console Hirb::View.enable So, you can do your…
Recent comments