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…
Keep your layouts DRY with Rails + JQueryMobile
Recently while working with JQueryMobile on Rails, i had a problem with layouts, because i had to repeat myself again and again in order to put some content in mobile version of application. In a…
Установка Redis на Ubuntu (manual)
Привет. Переходим в папку /tmp, и качаем естественно redis, в данном случае stable версия 2.4.8, но вы всегда можете пройти по этой ссылке и скачать послед версию. cd /tmp wget http://redis.googlecode.com/files/redis-2.4.8.tar.gz tar -zxf redis-2.2.4.tar.gz cd redis-2.2.4…
Recent comments