Skip to content

Instantly share code, notes, and snippets.

View sourabh-upadhyay's full-sized avatar
🎯
Focusing

Sourabh Upadhyay sourabh-upadhyay

🎯
Focusing
View GitHub Profile
@sourabh-upadhyay
sourabh-upadhyay / Sublime_configue_for_ROR.md
Last active December 19, 2016 06:15
Sublime configure for Ruby on Rails

Here are some github repo and there:

Steps:

  1. go to your Sublime

  2. menu bar > Preferences(or alt + n) > Browse Packages

  3. It will open the current packages folder

  4. Cope the url(path) and open the this in terminal then run the below commands:

  5. sublime-text-2-clipboard-history git clone https://github.com/kemayo/sublime-text-2-clipboard-history.git

@sourabh-upadhyay
sourabh-upadhyay / mysql_instruction_installation
Last active August 29, 2015 14:24
Mysql in ubuntu (rails)
For Ubuntu Users:
sudo apt-get install libmysqlclient-dev
sudo gem install mysql2
After that run bundle install
@sourabh-upadhyay
sourabh-upadhyay / gitsetup.txt
Last active May 28, 2022 14:27
Git setup for new repository
**Setup git for new repository**
1) cd project_dir
2) git init #(initial git repository )
3) git add . # add all files and folderes
4) git commit -m "Initial commit" # committing changes
# Before 5th step, need to create a new repository in github and copy the `ssh` path
5) git remote add origin youruser@yourserver.com:/path/to/my_project.git # connect origin repo to local
6) git push origin master # push all the changes
@sourabh-upadhyay
sourabh-upadhyay / ror_interview_questions.md
Last active August 16, 2017 07:14
Ruby on Rails interview questions

Ruby

  • What is eigenclass ?
  • Module and class (difference and when to use)?
  • 'class_evel', 'module_eval' and 'instance_eval'(explain and difference, when to use)?
  • Difference between 'each' and 'map'.
  • Difference between 'find' and 'select'.
  • 'delegate' in ruby.
  • Single qoute('') vs Double qoute ("")
  • Bang operate(!) differences.
  • instance variable vs Class variable?
@sourabh-upadhyay
sourabh-upadhyay / git_custom_script.bashrc
Created May 10, 2016 14:38
git custom script (command)
1. Open .bashrc file(/home/.bashrc)
2. syncBranchWithMaster() {
git checkout master;
git pull origin master;
git checkout $1;
git rebase master;
}
alias sync-master=syncBranchWithMaster
# USAGE : sync-master branc-to-sync
Put this code over there.
@sourabh-upadhyay
sourabh-upadhyay / scp_with_pem.txt
Created June 1, 2016 12:52
Copy scp with pem key(file)
scp -i path_to_pem_file file_to_copy ec2-user@xx.xxx.x.xx:~/.
@sourabh-upadhyay
sourabh-upadhyay / multiple_database_in_single_environment.txt
Last active June 2, 2016 13:15
Multiple databases in single environment
http://www.ostinelli.net/setting-multiple-databases-rails-definitive-guide/
http://technology.customink.com/blog/2015/06/22/rails-multi-database-best-practices-roundup/
@sourabh-upadhyay
sourabh-upadhyay / multiple_mysql_instances_in_ubuntu.txt
Created June 2, 2016 15:13
How to configure multiple mysql instance in Ubuntu
http://sharadchhetri.com/2013/12/04/how-to-configure-multiple-mysql-instance-in-ubuntu/

SQL

Transact SQL.

[TOC]

Ustvarjanje baze

CREATE DATABASE

@sourabh-upadhyay
sourabh-upadhyay / odoo_installation_steps.md
Created December 21, 2016 11:08
Odoo setup in Ubuntu

Install Database and Server Dependencies

sudo apt-get update && sudo apt-get upgrade

Create Odoo User and Log Directory

  • Create the Odoo system user: sudo adduser --system --home=/opt/odoo --group odoo