Skip to content

Instantly share code, notes, and snippets.

Slow to respond

Ankur Kumar ankurk91

Slow to respond
View GitHub Profile
ankurk91 / laravel-project.conf
Last active December 28, 2022 06:00
Ngnix conf with php on Ubuntu 20/22
View laravel-project.conf
# /etc/nginx/sites-enabled/laravel.conf
server {
listen 80;
# listen 443 ssl;
# ssl_certificate /etc/nginx/certs/laravel.test.pem;
# ssl_certificate_key /etc/nginx/certs/laravel.test-key.pem;
server_name laravel.test *.laravel.test;
ankurk91 / docker-compose.yml
Last active March 27, 2023 01:58
My docker compose for local development
View docker-compose.yml
version: "3"
image: 'nickblah/postgis:15-postgis-3'
container_name: postgres-15
restart: unless-stopped
- "${FORWARD_PGSQL_PORT:-5432}:5432"
ankurk91 /
Last active September 18, 2022 16:53
DNSmasq on Ubuntu 18/20

DNSmasq wildcard on Ubuntu 18/20

  • Install dnsmasq
sudo apt install -y dnsmasq
sudo apt install -y resolvconf
  • 💡 The dnsmasq service will fail to start, you can ignore those errors for timebeing
  • Disable the default systemd-resolved service
ankurk91 /
Last active March 7, 2022 04:57
Install Postman, PhpStorm on Ubuntu Linux (no snaps)
set -euo pipefail
# Run this script without sudo
# bash
ankurk91 /
Last active March 27, 2023 01:57
PostgreSQL Database on Ubuntu 20

PostgreSQL on Ubuntu

⚠️ I would rather recommand to install PostgreSQL inside docker.

Add PPA Source

sudo sh -c 'echo "deb $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - | sudo apt-key add -
sudo apt-get update
ankurk91 /
Last active March 28, 2023 20:19
Laravel Horizon, redis-server, supervisord on Ubuntu server

Laravel Horizon, redis-server, supervisord on Ubuntu 20/22 server

Laravel 8+, Horizon 5.x, Redis 6+

Parepare application

  • Install and configure Laravel Horizon as instructed in docs
  • Make sure you can access the Horizon dashboard like -
  • For now it should show status as inactive on dashbaord

Install redis-server

ankurk91 /
Last active March 5, 2023 19:43
elementary OS 5.1 Hera

elementaryOS Apps and Configs

⚠️ No longer maintained! ⚠️

This guide has been updated for elementaryOS v5.0+.

Enbale PPA support

sudo apt-get update
sudo apt-get -y install software-properties-common
ankurk91 /
Last active May 17, 2021 04:15
Mac OS 10.15 Apps and configs

macOS Apps

⚠️ No longer maintained! ⚠️


# Install x-code command line tools 
xcode-select --install

# Install homebrew iteself
ankurk91 /
Last active December 25, 2022 02:48
:octocat: Git branch name in Linux/Mac Bash Terminal

Mac OS : Show your git branch name on your bash terminal

⚠️ Does not work in zsh terminal

Add these lines in your ~/.bash_profile file

# Show current git branch name
parse_git_branch() {
     git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
ankurk91 /
Last active March 19, 2023 17:27
Signing git 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