Posts

Showing posts from December, 2021

#4. Sublime settings

Must have these following settings before using sublime text editor for better software development. Many developer use Sublime as text editor for software development. Sublime is easy to use and have lots of features that we need in day to day life of software development. Here are some of the hacks that we can try. Setting #1 Go to, Preferences -> Settings copy and paste the followings code, { "color_scheme": "Packages/Color Scheme - Default/Mariana.sublime-color-scheme", "font_size": 11, "ignored_packages": [ "Vintage" ], "save_on_focus_lost": true, "tab_size": 2, "theme": "Adaptive.sublime-theme", "translate_tabs_to_spaces": true } Setting #2 Go to Preferences -> Settings - Syntax Specific copy and paste the followings code, // These settings override both User and Default settings for the Ruby syntax {   "detect_indentation": false,   "defau...

#2. How to create git alias

git config --global alias.co checkout git config --global alias.br branch git config --global alias.st status File where these settings are stored is,  ~/.gitconfig cat ~/.gitconfig

#3. Git global settings on ubuntu system

git config --global user.name "Raj Kumar" git config --global user.email 2017kamb@gmail.com git config --global core.editor vim git config --global merge.tool meld git config --global  diff.guitool meld git config --list Example, raj@ROR-04:~$ git config --list alias.co=checkout alias.br=branch alias.st=status user.name=Raj Kumar user.email=2017kamb@gmail.com core.editor=gedit merge.tool=meld diff.guitool=meld File where these settings are stored is,  ~/.gitconfig

#1. System setup for Ruby on Rails projects on Ubuntu

Before format take Backup of the following -  Openvpn file - client.openvpn docker file - client certificate file .thunderbird - complete folder .ssh - complete folder .purple - complete folder for pidgin Other Important documents Fresh installation -  Synaptic Package Manager -  Install from software center  sudo apt install vim 'pg' gem supporting libraries sudo apt install libpq-dev sudo apt install libpq-dev build-essential gparted - for memory management Install from software center openvpn - install from software center Pidgin - Install from software center Google chrome - download debian file(.deb) from chrome website git -  sudo apt install git sudo apt install git-gui git alias -  https://learnwithrkumar.blogspot.com/2021/12/create-git-alias.html git global settings -  https://learnwithrkumar.blogspot.com/2021/12/git-setup-on-ubuntu-system.html Ssh key generate and add it to github. sudo apt install net-tools sudo apt install curl postgresql +...

#24. MySQL cheatsheet

MySQL cheatsheet sudo service mysql stop sudo service mysql start mysql -u root -p -h 198.11.12.12 machine_integration select code from stock sf where sf.code LIKE 'CO%S' limit 10; 'CONS' 'CONS' 'CONS' 'CONS' 'CONS' 'CONS' 'CONS' 'CONS'

RSpec cheatsheet

RSpec cheatsheet  install rspec-rails gem only, it will install all the rspec related gems. Basic setup steps Step1: gem 'rspec-rails' root@f79191f58a4f:~# gem list rspec *** LOCAL GEMS *** rspec-core (3.9.3) rspec-expectations (3.9.4) rspec-mocks (3.9.1) rspec-rails (3.9.1) rspec-support (3.9.4) Step2: rails generate rspec:install it will create 3 files, .rspec spec/rails_helper.rb spec/spec_helper.rb Step3: put these two lines in the .rspec file, --require spec_helper --format documentation Step4:  run rspec as, rspec ------ Basic knowledge All the spec(specification) files stay inside spec folder. Allthe spec file ends with *_spec.rb Example - spec/sales_spec.rb All files in this directory(spec/**/*_spec.rb)will be run automatically when we run,  rspec Dry run spec as, rspec --dry-run Run a particular spec, rspec spec/sales_spec.rb Run a particular spec from a particular line, rspec spec/coffee_spec.rb:31 Run rspec with formatted output as, rspec --format doc...