Skip to content

Instantly share code, notes, and snippets.

View RaphaelDeLaGhetto's full-sized avatar

Daniel Bidulock RaphaelDeLaGhetto

View GitHub Profile
@RaphaelDeLaGhetto
RaphaelDeLaGhetto / post-install-ubuntu-22.sh
Last active October 23, 2023 17:21
Post install goodies for Ubuntu 22
#!/usr/bin/env bash
#
# For Ubuntu 22.04
#
# Execute as `app` user:
#
# `sudo -u app /home/app/post-install-ubuntu-22.sh`
#
sudo apt update
@RaphaelDeLaGhetto
RaphaelDeLaGhetto / HOWTO.md
Created May 13, 2022 22:20 — forked from marufshidiq/HOWTO.md
Backup and Restore mongodb inside docker-compose container

How to backup

docker-compose exec -T <mongodb_service_name> mongodump --archive --gzip --db <mongodb_database> > dump.gz

How to restore

docker-compose exec -T  mongorestore --archive --gzip &lt; dump.gz
@RaphaelDeLaGhetto
RaphaelDeLaGhetto / post-install-ubuntu-20.sh
Last active September 22, 2020 21:50
Post install goodies for Ubuntu 20.04
#!/bin/bash
#
# For Ubuntu 20.04
# `sudo` Execute as `app` user
#
# Still have some permissions issues. Some folders/files end up belonging to `root`
#
apt update
apt -y upgrade
#!/bin/bash
#
# For Ubuntu 18.04
# `sudo` Execute as `app` user
#
# Still have some permissions issues. Some folders/files end up belonging to `root`. Gets about halfway through `ruby` install
#
apt update
apt -y upgrade
@RaphaelDeLaGhetto
RaphaelDeLaGhetto / post-install-goodies.sh
Last active December 22, 2018 17:19
Setup all my usual post-install goodies on an Ubuntu 16.04 server
#!/bin/bash
#
# As detailed here: https://libertyseeds.ca/2017/07/10/A-Home-Based-Ubuntu-16-04-Production-Server-with-Salvaged-Equipment/
# `sudo` Execute as `app` user
#
# Still have some permissions issues. Some folders/files end up belonging to `root`. Gets about halfway through `ruby` install
#
apt update
apt -y upgrade
@RaphaelDeLaGhetto
RaphaelDeLaGhetto / answers.sql
Last active December 28, 2015 17:56
Exercises from http://www.pgexercises.com/ for W3D1 of lighthouselabs.com web development bootcamp
-- Basic
-- Retrieve everything from a table
SELECT * FROM cd.facilities;
-- Retrieve specific columns from a table
SELECT name, membercost FROM cd.facilities;
-- Control which rows are retrieved
SELECT * FROM cd.facilities WHERE membercost > 0;