Pages

Tuesday, 26 January 2016

Installing postgresql in Ubuntu/Trusty64 vagrant box!

                                                   So to install postgresql in vagrant ubuntu/trusty64 it's quite simple first of all run this command in terminal like this ...


This file will basically create a file in /etc/apt/sources.list.d/ directory which we name pgdg.list and will open this file in nano text editor .. so all you gotta do now is add the following line as shown in the pic below


after saving this run this one more command in the terminal[note :- i forgot to add this step when i was actually writing this post now i use babun so terminal may look different :p only for this step ]



Now all you gotta do is update the system using "sudo apt-get update" after this just add the following command to get this latest version of postgresql


As you can see it's postgresql 9.5 which is latest at the day i'm writing this blog! That's it!

Friday, 22 January 2016

Music Player in Kali Linux Terminal ..!

                                                          So in this post i'm gonna show you how you can install a music player in Kali Linux Terminal as show in the terminal!


So all you need is to run the following command in terminal as shown in the pics below


This actually installs the moc player now we need ffmpeg-plugin for moc player. run the following command shown in the pic below


That's it ...you can launch this player using the command "mocp" in terminal... one more thing it has many themes and then are present in /usr/share/moc/themes directory as shown in the picture below


So to use any theme(transparent-background in my case) provided in the directory use the command "moc -T transparent-background" in terminal and that's it. if you like this then let me know in the comment section :D

Vagrant on Kali Linux!

                                              Hey guys in this post i'll show you how you can start with vagrant on kali linux! So first of all you need is virtual box, virtual box dkms and linux headers of kali linux so for that purpose run the following command in terminal.


Linux headers for kali linux is a dependency of virutal dkms so it will automatically install! After running this go to this Link and download vagrant for debian systems! After this go to the downloads folder and run the following command to install vagrant!


this will go and install vagrant in your kali linux! :D Awesome isn't it ?
So now just type "vagrant -h" in the terminal to see vagrant!


Now as you can see vagrant is working properly in kali linux! So now you can just add ubuntu/trusty vagrant box into vagrant or also you can add your own custom box!

Monday, 18 January 2016

How to make a vagrant box from an existing one.

                     

In this article i'm gonna show you how to make a vagrant box from an existing one .... Packaging a vagrant box helps us not doing the same sysadmin stuffs all the time. For this example i'll be using ubuntu/trusty64. So all you need to do is set the development environment properly in the ubuntu/trusty64 vagrant box and then run this command.


So now you can easily save that swapnilrailsbox.box vagrant box to your vagrant box collection and whenever you need that same kinda development environment you can just add it like shown in the pic below.


Now you can use it in which ever project you want. Awesome!

Sunday, 17 January 2016

Mysql installation in linux via command line.

                So to install mysql via command line just enter the following command and it will setup everything related to mysql.


That's it. This will go and install mysql for you.

Wednesday, 23 December 2015

rbenv, ruby remote interpreter, rubymine, vagrant => Everything you need to know!

                                                      So guys all i was doing when working with laravel, django or rails with vagrant is i have to configure both my host as well as guest environment to work with software(python(Django), PHP(Laravel), Ruby(Rails)) and things become pretty shitty when railsinstaller incase of windows doesn't supporting new versions of Ruby as well as Rails .... Django-python & Laravel-php doesn't have these problems as they have better support on windows as well as on Trusty64 guest machines.

So incase of ruby all you have to do is set the remote interpreter instead of the local interpreter installed in windows. So open the setting and search for interpreter and add the remote interpreter by clicking on the '+' sign. then search for ruby interpreter it will give path to shims directory in .rbenv but you have to go into the versions directory and mark my words select "irb" instead of ruby as it wants ruby interpreter(irb) instead of ruby. This will solve the whole problem. Thats it!

P.S. => Software_Devs@JETBRAINS are doing awesome job! It's really time to say gudbye to sublime(no offence) :p 

Saturday, 28 November 2015

clearing screen & pasting using "CTRL + v" in windows command prompt.

Things become quite frustating when you just migrated from linux desktop world to windows world!
Specially tasks which uses terminal or command prompt(in windows) ... So, today i found these two awesome script's of autohotkey.. todo these tasks same as we do in linux world.
Simply download autohotkey from https://autohotkey.com and make two scripts with .ahk extension for example for pasting in terminal make copypaste.ahk and for clearing screen make clearingscreen.ahk and add the following code in both the file

;-----------------------------------------------------------------------------------------------------------------
;for pasting data

#IfWinActive ahk_class ConsoleWindowClass
^V::
SendInput {Raw}%clipboard%
return
#IfWinActive.
;-----------------------------------------------------------------------------------------------------------------

;for clearing screen in command prompt
; -------------------------------------------------------------------------
; Cntr-L should clear screen
; -------------------------------------------------------------------------
#IfWinActive ahk_class ConsoleWindowClass
^L::
Send cls{Enter}
return

#IfWinActive
;---------------------------------------------------------------------------------------------------------------------

After making these two files just double click and run 'em! thats it.
WARNING:- Things will easily break and become serious pain in head if you run vagrant ... so tip is suspend them from the arrow(in TASKBAR). Thanks!