Skip to content

Instantly share code, notes, and snippets.

View johnrlive's full-sized avatar

John Rodriguez johnrlive

  • NY
View GitHub Profile
# Rails production setup via SQLite3 made durable by https://litestream.io/
# Copy this to Dockerfile on a fresh rails app. Deploy to fly.io or any other container engine.
#
# try locally: docker build . -t rails && docker run -p3000:3000 -it rails
#
# in production you might want to map /data to somewhere on the host,
# but you don't have to!
#
FROM ruby:3.0.2
@stancl
stancl / deploy.sh
Last active September 16, 2024 02:39
Deploy using GitHub actions and SSH to a VPS
#!/bin/sh
set -e
vendor/bin/phpunit
npm run prod
git add .
(git commit -m "Build frontend assets for deployment to production") || true
(git push) || true
@entone
entone / .dockerignore
Last active October 3, 2020 03:54
Elixir 1.9 example Dockerfile
/_build/
# If you run "mix test --cover", coverage assets end up here.
/cover/
# The directory Mix downloads your dependencies sources to.
/deps/
# Where 3rd-party dependencies like ExDoc output generated docs.
/doc/
@dbonates
dbonates / pcat.sh
Last active December 17, 2022 04:05
pcat install, because cat should be pretty! 🐱
################
### macOS ###
################
brew install python3
brew install python
brew unlink python && brew link --overwrite python # make sure python links to python2
pip2 install --upgrade pip setuptools # upgrade to latest pip2
pip3 install --upgrade pip setuptools # upgrade to latest pip3
@philippeoz
philippeoz / ngrok.sh
Last active September 13, 2024 14:57
SSH with Ngrok
#########################
# ON SERVER #
#########################
# install openssh-server
sudo apt install openssh-server
# start openssh-server
sudo service ssh start
@johnrlive
johnrlive / up-and-running-with-edeliver-on-do.md
Created March 11, 2019 23:58 — forked from davoclavo/up-and-running-with-edeliver-on-do.md
Getting Elixir / Phoenix running on Digital Ocean with edeliver

Build Server

  • Go to Digital Ocean
  • Create new ubuntu droplet

Setup Server

@johnrlive
johnrlive / .aliases
Last active April 6, 2022 02:30
Basic .vimrc config for DevOps
#V1 test
###### Aliases ######
## TMUX ALIASES ##
alias t="tmux"
alias tl="tmux ls"
alias tk="tmux kill-session -t"
alias tn="tmux new -s"
alias tat="tmux attach-session -t"
## PYTHON ALIASES
alias pip="pip3"
@Tras2
Tras2 / cloudflare-ddns-update.sh
Last active November 14, 2024 03:50
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@BretFisher
BretFisher / pcat-install.sh
Last active February 6, 2024 14:41
On macOS: Install pygmentize and alias pcat for shell code syntax highlighting
# first install pygmentize to the mac OS X or macOS system with the built-in python
sudo easy_install Pygments
# then add alias to your ~/.bash_profile or ~/.bashrc or ~/.zshrc etc.
alias pcat='pygmentize -f terminal256 -O style=native -g'
@oligriffiths
oligriffiths / ember-tumblr-addons.md
Last active January 14, 2018 05:26
Ember.js addons we've been using at Tumblr