Skip to content

Instantly share code, notes, and snippets.

View przbadu's full-sized avatar
🏠
Working from home

Pushpa Raj Badu przbadu

🏠
Working from home
View GitHub Profile
# BAD each iteration loads invoice model
class Company < ApplicationRecord
has_many :invoices
end
class Invoice < ApplicationRecord
belongs_to :company
end
@przbadu
przbadu / nvim.md
Last active April 7, 2022 07:03
Configure Nvim for Rails development
@przbadu
przbadu / tmux.conf
Last active August 17, 2021 05:36
tmux conf file [przbadu]
###########################
# Configuration
###########################
# use 256 term for pretty colors
# set -g default-terminal "screen-256color" # making tmux slow
set -g default-terminal "xterm-256color"
# Enable mouse support
set -g mouse on
@przbadu
przbadu / notes.md
Created October 26, 2017 04:21 — forked from matthewjberger/notes.md
How to make an electron app using Create-React-App and Electron with Electron-Builder.
@matthewjberger
matthewjberger / notes.md
Last active March 11, 2024 10:21
How to make an electron app using Create-React-App and Electron with Electron-Builder.
@przbadu
przbadu / Ctags.md
Last active March 9, 2024 13:25
Ctags for ruby on rails and node applications

Install ctags

http://ctags.sourceforge.net follow this url for installation and documentation.

Ctags with Ruby/Rails

We can ctags lots of programming languages. Here is how to do it for ruby/rails. I really like how RubyMine jumps to the source code (either withing project score or to the gem source). This is really useful for reading source code for those classes, methods, modules etc. But Now that I use vim as My IDE/Editor I really like that functionality to happen in my vim editor. And I found ctags as the solution.

@przbadu
przbadu / setup-rspec.md
Last active August 22, 2017 02:21
Common configurations for rspec-rails, shoulda-matchers, factory_girl_rails and database_cleaner

Setting up Rspec

Add required gems to Gemfile

group :development, :test do
  gem 'rspec-rails', '~> 3.5'
  gem 'shoulda-matchers'
  gem 'factory_girl_rails'
 gem 'database_cleaner', '~&gt; 1.6.0'
# This is example contains the bare mininum to get nginx going with
# unicorn servers. Generally these configuration settings
# are applicable to other HTTP application servers (and not just Ruby
# ones), so if you have one working well for proxying another app
# server, feel free to continue using it.
#
# The only setting we feel strongly about is the fail_timeout=0
# directive in the "upstream" block. max_fails=0 also has the same
# effect as fail_timeout=0 for current versions of nginx and may be
# used in its place.
@przbadu
przbadu / setup-react-redux-webpack.md
Last active June 22, 2017 10:50
Setup steps for react, redux, es6 using webpack
@joker1007
joker1007 / Dockerfile
Last active July 4, 2022 13:55
Sample Dockerfile for rails app
FROM appbase
# install npm & bower packages
WORKDIR /root
COPY package.json bower.json /root/
RUN npm install --only=prod && \
npm cache clean && \
bower install --allow-root
# install gems