Skip to content

Instantly share code, notes, and snippets.

View promisepreston's full-sized avatar
💭
Gifted and Result-Oriented

Promise Chukwuenyem promisepreston

💭
Gifted and Result-Oriented
View GitHub Profile
@promisepreston
promisepreston / starship.toml
Last active May 8, 2023 18:10
Starship configuration file
# ~/.config/starship.toml
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
# Inserts a blank line between shell prompts
add_newline = true
[aws]
disabled = false
@promisepreston
promisepreston / Jenkinsfile
Created July 14, 2020 18:16 — forked from bvis/Jenkinsfile
Jenkin pipeline definition example to be integrated with Docker Swarm cluster in our CI/CD environment
pipeline {
agent { node { label 'swarm-ci' } }
environment {
TEST_PREFIX = "test-IMAGE"
TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}"
TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}"
REGISTRY_ADDRESS = "my.registry.address.com"
SLACK_CHANNEL = "#deployment-notifications"
@promisepreston
promisepreston / Gemfile
Created June 25, 2020 04:41 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers

References

  1. Forest Admin VS Active Admin: The Complete Comparison
  2. How To Set Up Ruby on Rails with Postgres
  3. Integrating Forest CMS to Rails 5.2.0 API mode

How to Change Lepton's Theme

Changing Lepton to Dark Theme and TabSize 2 for Linux Snap Package

N/B: Do not use administrative rights (sudo) for any command that you would run

  1. Create a file named .leptonrc on your Desktop

  2. Put the code below into it

Deploying Rails Applications with the Puma Web Server

Last updated on Jan 15, 2019

This article assumes that you are running Ruby 2.5 or higher, Rails 5.0 or higher and Ubuntu 18.04 or higher.

Table of Contents

Adding Puma to your application

Puma Config

Install Zammad in Production with Docker-Compose

Docker is a container-based software framework for automating deployment of applications. Compose is a tool for defining and running multi-container Docker applications. This repo is meant to be the starting point for somebody who likes to use dockerized multi-container Zammad in production. The Zammad Docker image uses the stable branch of Zammad’s Git repo.

The Docker images are hosted on DockerHub:

But in production it is well suited to use the Zammad Docker Compose Image. The Zammad Docker Image can be used in developement and test environments.

@promisepreston
promisepreston / difference_between_git_fetch_and_git_pull.md
Last active December 12, 2019 16:02
When to use Git fetch and Git Pull

Git Cheat Sheet

Glossary

Entities Description
branch lightweight movable pointer to a commit
clone local version of a repository, including all commits and branches
commit A Git object, a snapshot of your entire repository compressed into a SHA
git An open source, distributed version-control system
GitHub A platform for hosting and collaborating on Git repositories

Installing and Configuring PgAdmin 4

Introduction

pgAdmin is the most popular and feature-rich platform for administration and development of PostgreSQL databases. Check the pgAdmin official page for more information.

Connect to your Remote PostgreSQL Database

To connect to your remote PostgreSQL database server using pgAdmin 4, follow these steps:

NB: Only use sudo if your PostgreSQL database was installed as root.

Install and Setup Nginx on Ubuntu 18.04

Install the Prerequisites

sudo apt install curl gnupg2 ca-certificates lsb-release

Set up the Apt Repository

Do not set up the apt repository for stable nginx packages by running the following command below if your architecture is amd64 (64 bit):

echo "deb http://nginx.org/packages/ubuntu lsb_release -cs` nginx" \