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
@przbadu
przbadu / pg_restore_heroku_db.md
Last active April 9, 2024 11:18
How to restore postgresql dump file into Heroku application using `pg_restore` command.

Use pg_restore to restore latest dump file

Sometimes heroku pg:copy fails, in that case, we can use pg_restore command

Get the credentials

heroku pg:credentials DATABASE_URL -a <app-name>
@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 / react_on_docker2.md
Created October 29, 2020 04:31
Docker configuration to run react app

Setup docker to run React app

After setting up docker to generate React app without installing node js in https://gist.github.com/przbadu/4a62a5fc5f117cda1ed5dc5409bd4ac1 It was confusing to some of the devs, how to run react app, so I am creating this as second step to the configuration.

Generate required files in your react project

cd my-react-app
touch Dockerfile Dockerfile.dev docker-compose.yml .dockerignore
@przbadu
przbadu / react-on-docker.md
Last active December 16, 2023 13:44
Setup Docker for React development

STEP 2: setup docker to run react app (dev and production) configuration: https://gist.github.com/przbadu/929fc2b0d5d4cd78a5efe76d37f891b6

Setup Docker for React development

Because we are using Docker, we are not going to install node, npm, create-react-app in our development machine, not even for generating create-react-app scaffold.

For this purpose I am using 2-step docker configuration:

  • In first step, we will create a simple docker container, that does only one thing, install create-react-app
@przbadu
przbadu / Windows rails deployment.md
Last active June 6, 2023 20:11 — forked from userrails/Windows rails deployment.md
Deployment steps for rails in windows

Install required brew packages

brew install openssl@1.1 readline libyaml gmp

Note openssl@1.1 and readline needs to be installed, otherwise installation will fail.

.zshrc file configurations

@przbadu
przbadu / _vue-rails.md
Last active July 16, 2022 21:48
Vue js and Rails integration

Setup Rails and Vuejs

  1. Generate new rails app using --webpack flag
rails new myApp --webpack=vue

Note:

  1. You can use --webpack=angular for angular application and --webpack=react for react.
@przbadu
przbadu / docker-postgres.md
Last active May 28, 2022 16:21
docker-postgresql-setup

Create docker-compose.yml file

version: "3"
services:
  db:
    image: "postgres"
    container_name: "my_postgres"
    ports:
 - "54320:5432"
@przbadu
przbadu / nvim.md
Last active April 7, 2022 07:03
Configure Nvim for Rails development
@przbadu
przbadu / bloc_readme.md
Created March 24, 2022 02:21
Bloc, cubit and stream short intro