Skip to content

Instantly share code, notes, and snippets.

View Thegaijin's full-sized avatar
💭
"No body cares, work harder"

Ssemaganda Thegaijin

💭
"No body cares, work harder"
View GitHub Profile
@Thegaijin
Thegaijin / docker.yaml
Created February 17, 2021 20:14 — forked from rbq/docker.yaml
Install Docker CE on Ubuntu using Ansible
---
- hosts: all
tasks:
- name: Install prerequisites for Docker repository
apt:
name: ['apt-transport-https', 'ca-certificates', 'curl', 'gnupg2', 'software-properties-common']
update_cache: yes
- name: Add Docker GPG key
apt_key: url=https://download.docker.com/linux/ubuntu/gpg
@Thegaijin
Thegaijin / bitbucket-pipelines.yml
Created June 22, 2020 13:48 — forked from tstrohmeier/bitbucket-pipelines.yml
AWS ECS: Script for creating a new revision of a task definition and update a service
# enable Docker for your repository
options:
docker: true
pipelines:
branches:
development:
- step:
# python image with aws-cli installed
@Thegaijin
Thegaijin / postgres-cheatsheet.md
Created May 27, 2020 12:01 — 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)
#!/usr/bin/env bash
touch createstartcript.sh
if [ "$BITBUCKET_BRANCH" == master ]; then
export MYENV=$BITBUCKET_BRANCH
sudo bash -c 'cat > ./createstartcript.sh <<EOF
#!/usr/bin/env bash
java -jar FileName-1.0.jar --spring.profiles.active=${MYENV}
@Thegaijin
Thegaijin / gpg_git_signing.md
Created May 5, 2020 17:49 — forked from alopresto/gpg_git_signing.md
Steps to enable GPG signing of git commits.

If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:

  1. Generate and add your key to GitHub
  2. $ git config --global commit.gpgsign true ([OPTIONAL] every commit will now be signed)
  3. $ git config --global user.signingkey ABCDEF01 (where ABCDEF01 is the fingerprint of the key to use)
  4. $ git config --global alias.logs "log --show-signature" (now available as $ git logs)
  5. $ git config --global alias.cis "commit -S" (optional if global signing is false)
  6. $ echo "Some content" >> example.txt
  7. $ git add example.txt
  8. $ git cis -m "This commit is signed by a GPG key." (regular commit will work if global signing is enabled)
@Thegaijin
Thegaijin / github_gpg_key.md
Created March 26, 2020 23:05 — forked from ankurk91/github_gpg_key.md
Github : Signing commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@Thegaijin
Thegaijin / postgres-brew.md
Created July 23, 2019 16:57 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@Thegaijin
Thegaijin / bash-colors.md
Created August 13, 2018 22:39 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple