Skip to content

Instantly share code, notes, and snippets.

przbadu przbadu

Block or report user

Report or block przbadu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@przbadu
przbadu / docker-postgres.md
Last active Jul 29, 2019
docker-postgresql-setup
View docker-postgres.md

Create docker-compose.yml file

version: "3"
services:
  db:
    image: "postgres"
    container_name: "my_postgres"
    ports:
      - "54320:5432"
@przbadu
przbadu / heroku-copy-config
Created Apr 24, 2018
copy heroku config vars from source app to target app.
View heroku-copy-config
#!/bin/bash
# Author: przbadu
#
# Usage: heroku-copy-config <source> <target>
set -e
sourceApp="$1"
targetApp="$2"
config=""
@przbadu
przbadu / Windows rails deployment.md
Created Jan 7, 2018 — forked from userrails/Windows rails deployment.md
Deployment steps for rails in windows
View Windows rails deployment.md
@przbadu
przbadu / notes.md
Created Oct 26, 2017 — forked from matthewjberger/notes.md
How to make an electron app using Create-React-App and Electron with Electron-Builder.
View notes.md
@przbadu
przbadu / tslint.md
Last active Oct 24, 2017
tslint with prettier
View tslint.md

Install and configure tslint and prettier

yarn global add tslint typescript
tslint --init
yarn add prettier --dev --exact
npm i -D tslint-config-prettier

tslint.json

@przbadu
przbadu / _vue-rails.md
Last active Jan 9, 2020
Vue js and Rails integration
View _vue-rails.md

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 / .eslintrc.json
Last active Oct 24, 2017
Eslint for react with prettier
View .eslintrc.json
{
"extends": ["airbnb", "prettier", "prettier/react"],
"plugins": ["prettier"],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2016,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
@przbadu
przbadu / _.attempt.js
Created Aug 28, 2017
Lodash useful helper functions that we should use from today.
View _.attempt.js
// Using try-catch to handle the JSON.parse error
function parse(str){
try {
return JSON.parse(str);
}
catch(e) {
return false;
}
}
@przbadu
przbadu / react-on-docker.md
Created Aug 24, 2017
Setup Docker for React development
View react-on-docker.md

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 and we can use it to generate create-react-app scaffold.
  • And second docker configuration is project specific. It will handle nodemon, npm, development servers, etc.
You can’t perform that action at this time.