Skip to content

Instantly share code, notes, and snippets.

Slow to respond

Ankur Kumar ankurk91

Slow to respond
View GitHub Profile

PostgreSQL on Ubuntu 18.04

Add PPA Source

sudo sh -c 'echo "deb bionic-pgdg main" >> /etc/apt/sources.list.d/pgdg.list.list'
wget --quiet -O - | sudo apt-key add -
sudo apt update


ankurk91 /
Last active Jul 9, 2020
Laravel Horizon, redis-server, supervisord on Ubuntu server

Laravel Horizon, redis-server, supervisord on Ubuntu 16/18 server

Laravel 7.0, Horizon 4.x, Redis 5.x

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


Grub Boot from ISO

  • You can force grub to boot from an ISO file that is located on your hard disk

Sample file entry

exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
ankurk91 /
Last active Jul 6, 2020
elementary OS 5.1 Hera

elementaryOS Apps and Configs

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

Enbale PPA support

sudo apt-get update
sudo apt-get -y install software-properties-common

Install original plank dock

ankurk91 /
Last active May 19, 2020
Mac OS 10.15 Apps and configs

macOS Apps


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

# Install homebrew iteself
/usr/bin/ruby -e "$(curl -fsSL"
ankurk91 / axios-dev-interceptors.js
Last active Jun 3, 2020
axios logger (Interceptors)
View axios-dev-interceptors.js
// axios development only interceptors
* Strip baseURL from URL
* @param config Object
* @returns String
function getUrl(config) {
ankurk91 /
Last active Jun 24, 2020
: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 Jul 10, 2020
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
ankurk91 /
Last active Jul 8, 2020
php xDebug on Ubuntu/Mac and phpStorm 2019

🐞 Install and Configure xDebug on MacOS for PhpStorm 🐘

⚠️ This guide only applies to Homebrew v1.6+

  • Check your version brew --version before proceeding

  • Assuming that you have already installed php and apache via Homebrew v1.6+

  • Install xDebug php extension

pecl channel-update
pecl clear-cache
ankurk91 /
Last active Jul 10, 2020
Ubuntu 18.04 - PHP development (php 7.4, MySQL 5.7, apache 2.4)
set -euo pipefail
# Ubuntu 18.04 dev Server
# Run like - bash
# Script should auto terminate on errors
echo -e "\e[96m Adding PPA \e[39m"
sudo add-apt-repository -y ppa:ondrej/apache2
You can’t perform that action at this time.