Skip to content

Instantly share code, notes, and snippets.

View bryaneaton's full-sized avatar
🏖️
Tis the season

Bryan Eaton bryaneaton

🏖️
Tis the season
  • Maryville, TN
View GitHub Profile
@bryaneaton
bryaneaton / postgres-cheatsheet.md
Created July 7, 2022 22:44 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@bryaneaton
bryaneaton / build.sh
Created July 15, 2021 15:14 — forked from sempervent/build.sh
Docker build script
#!/usr/bin/env bash
# ex: set fdm=marker
# usage {{{1
#/ Usage:
#/ ./build.sh -r "REGISTRY/NAME" [OPTIONS]
#/
#/ -r|--registry)
#/ the name of the image or registry to push to [required]
#/
#/ -t|--tag)
@bryaneaton
bryaneaton / bash_skeleton.sh
Created September 24, 2019 15:52 — forked from sempervent/bash_skeleton.sh
A skeleton for bash Scripts
#!/usr/bin/env bash
# usage {{{1 ------------------------------------------------------------------
#/ Usage:
#/ -h|-?|--help)
#/ show this help and exit
#/
# 1}}} ------------------------------------------------------------------------
# environment {{{1 ------------------------------------------------------------
# 1}}} ------------------------------------------------------------------------
# functions {{{1 --------------------------------------------------------------
@bryaneaton
bryaneaton / geoserver
Created September 13, 2019 13:11 — forked from dancingfrog/geoserver
Sample /etc/init.d script for running GeoServer as a service
#!/bin/sh
### BEGIN INIT INFO
# Provides: GeoServer
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Starts and stops the GeoServer, which should be located at /usr/share/geoserver
### END INIT INFO
// See this for important info :
http://docs.geoserver.org/stable/en/user/_sources/rest/examples/curl.txt
// Get all workspaces
curl -v -u admin:geoserver -GET http://localhost:8080/geoserver/rest/workspaces.xml
// Create a new WORKSPACE
curl -u admin:geoserver -v -XPOST -H 'Content-type:text/xml'
@bryaneaton
bryaneaton / tmux-cheatsheet.markdown
Created April 3, 2019 18:15 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@bryaneaton
bryaneaton / sync_playlists_to_users.py
Created March 2, 2019 02:29 — forked from JonnyWong16/sync_playlists_to_users.py
Sync Plex playlists to shared users.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Sync Plex playlists to shared users.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests, xmltodict
import requests
import xmltodict
@bryaneaton
bryaneaton / README.md
Created August 21, 2018 23:58 — forked from Remiii/README.md
How to delete Vault (AWS Glacier)

How to delete Vault (AWS Glacier)

This Gist give some tips in order to remove AWS Glacier Vault with AWS CLI (ie. https://aws.amazon.com/en/cli/).

Step 1 / Retrive inventory

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --vault-name YOUR_VAULT_NAME --account-id YOUR_ACCOUNT_ID --region YOUR_REGION