Skip to content

Instantly share code, notes, and snippets.

Less Active

Ankur Kumar ankurk91

Less Active
Block or report user

Report or block ankurk91

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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 Sep 6, 2019
Laravel Horizon, redis-server, supervisord on Ubuntu server

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

Laravel 6.0, Horizon 3.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 Aug 31, 2019
elementary OS 5.0 Juno

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 Jul 23, 2019
Mac OS 10.14 Apps and configs

macOS Apps


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

# Install homebrew iteself
/usr/bin/ruby -e "$(curl -fsSL"
ankurk91 /
Created Jun 22, 2017
Toggle an entry from your /etc/hosts
set -euo pipefail
# Toggle entry from /etc/hosts
ankurk91 / axios-dev-interceptors.js
Last active Apr 2, 2019
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 May 25, 2019
:octocat: Git branch name in Linux/Mac Terminal

Mac OS : Show your git branch name on your 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)/'
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
ankurk91 /
Last active Sep 14, 2019
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 Sep 8, 2019
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
You can’t perform that action at this time.