Skip to content

Instantly share code, notes, and snippets.

@forgotpw1
forgotpw1 / diskio.sh
Created August 23, 2018 22:18
Disk IO debian
iotop -a -p $(sed 's, , -p ,g' <<<`pgrep "_raid|_resync|jbd2"`)
@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 quasar-cli@0.6.5
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 / 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 / run_headless_specs.sh
Created June 1, 2016 16:39
Headless rspec run
xvfb-run -a bundle exec rspec spec/
@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 / gist:7439518
Created November 12, 2013 21:57
Edit text in browser tab
data:text/html, <html contenteditable>
@forgotpw1
forgotpw1 / cors.rb
Created November 19, 2015 21:27
Sinatra Response Header To Work Around CORS
response['Access-Control-Allow-Origin'] = '*'
@forgotpw1
forgotpw1 / gist:dc45e9588b6c95c0bdb9
Created October 24, 2015 20:11
Reference different versions of postgresql installed
psql --cluster 9.1/main --version
@forgotpw1
forgotpw1 / gist:3103083
Created July 13, 2012 06:19
How many git commits have project contributors made
git shortlog -s -n
@forgotpw1
forgotpw1 / gist:c90178145a3cfbb13b7d
Created June 3, 2015 22:46
Find where disk space clutter accumulates on ubuntu
sudo ncdu /