Skip to content

Instantly share code, notes, and snippets.

Webpack + react

New rails projet

rails new react-rails-webpacker
cd react-rails-webpacker

Add Gems

open Gemfile and ADD below gem

gem 'webpacker', '~> 3.3'

EDITING INSERT

  • i
  • I
  • a
  • A
  • o
  • O DELETING
  • x
# Compile source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@oudam-meas
oudam-meas / iterm2-solarized.md
Created January 18, 2018 00:33 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

install iterm 2

brew cask install iterm2

install oh my zsh

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Install nginx

update repository and install nginx

sudo apt-get install update
sudo apt-get install nginx -y

Install Mysql Server

sudo apt-get install mysql-server

-install react-native-debugger vai hoomebrew: brew update && brew cask install react-native-debugger

-install redux-devtools-extension npm install --save redux-devtools-extension

-in package.json => object "scripts", by replacing PORT with your react native runnning port. by default it's 8081 "scripts":{ .... "debug" : "open 'rndebugger://set-debugger-loc?host=localhost&port=PORT'"

@oudam-meas
oudam-meas / Remove-Node.txt
Created December 8, 2017 09:00 — forked from tonymtz/gist:d75101d9bdf764c890ef
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@oudam-meas
oudam-meas / nginx.default.conf
Created October 14, 2017 14:35 — forked from sumardi/nginx.default.conf
Install PHP-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php-fpm
# Install PHP extensions
sudo yum install -y php-devel php-mysql php-pdo \
php-pear php-mbstring php-cli php-odbc \