Skip to content

Instantly share code, notes, and snippets.

@forgotpw1
forgotpw1 / cors.rb
Created November 19, 2015 21:27
Sinatra Response Header To Work Around CORS
response['Access-Control-Allow-Origin'] = '*'
@forgotpw1
forgotpw1 / mailcatcher.sh
Created May 25, 2016 17:12
Expose mailcatcher for remote viewing. Make sure your server is firewalled.
mailcatcher --http-ip=0.0.0.0
@forgotpw1
forgotpw1 / run_headless_specs.sh
Created June 1, 2016 16:39
Headless rspec run
xvfb-run -a bundle exec rspec spec/
@forgotpw1
forgotpw1 / nginx.conf
Created January 19, 2018 19:11 — forked from sj26/nginx.conf
Proxy mailcatcher with nginx including WebSockets
daemon off;
error_log stderr;
events {
worker_connections 1024;
}
http {
# As suggested in http://nginx.org/en/docs/http/websocket.html
map $http_upgrade $connection_upgrade {
@forgotpw1
forgotpw1 / gist:0dd4df2674a2f302fb0b3ffb3d1fb5df
Last active February 23, 2018 21:50
Upgrading quasar framework - Maintaining old quasar-cli on upgrades
Install the 0.14-compatible quasar-cli as a dev dependency in your legacy project:
npm install --save-dev [email protected]
this will place the legacy cli in your project node_modules
to run quasar for your project:
npx quasar dev etc
npx is a wrapper that runs ./node_modules/.bin/quasar
source: steveclarke @ quasar discourse channel 2.23.2018
@forgotpw1
forgotpw1 / diskio.sh
Created August 23, 2018 22:18
Disk IO debian
iotop -a -p $(sed 's, , -p ,g' <<<`pgrep "_raid|_resync|jbd2"`)