Skip to content

Instantly share code, notes, and snippets.

@ray-sh
ray-sh / postgres-brew.md
Last active October 6, 2020 13:55 — forked from ibraheem4/postgres-brew.md
Prepare postgres for phoenix

Prepare Postgres for phoenix

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@ray-sh
ray-sh / instructions.md
Created December 23, 2019 09:04 — forked from marteinn/instructions.md
This is a Phoenix + React-Create-App integration with very small footprint
  1. Begin with scaffolding a create-react-app, then update your package.json build script (replace DIR_TO_PHX_APP with the path to your phoenix app)
"build": "react-scripts build && rm -rf DIR_TO_PHX_APP/priv/static/build && mv build DIR_TO_PHX_APP/priv/static/build",

This will move your prod build files to DIR_TO_PHX_APP/priv/static/build on build

  1. Run yarn build
@ray-sh
ray-sh / 01.README.md
Created November 11, 2020 13:21 — forked from mmmries/01.README.md
Load Test Phoenix Presence

Phoenix Nodes

First I created 3 droplets on digital ocean with 4-cores and 8GB of RAM. Login as root to each and run:

sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
ulimit -n 4000000
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
@ray-sh
ray-sh / curl.md
Created June 16, 2022 07:48 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.