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
View postgresql-ubuntu.md

PostgreSQL on Ubuntu 18.04

Add PPA Source

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" >> /etc/apt/sources.list.d/pgdg.list.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update

Install

@ankurk91
ankurk91 / laravel_horizon.md
Last active Sep 6, 2019
Laravel Horizon, redis-server, supervisord on Ubuntu server
View laravel_horizon.md

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 - http://yourapp.com/horizon
  • For now it should show status as inactive on dashbaord

Install redis-server

View boot-from-iso.md

Grub Boot from ISO

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

Sample file entry

#!/bin/sh
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
ankurk91 / 1-elementary-os-apps.md
Last active Aug 31, 2019
elementary OS 5.0 Juno
View 1-elementary-os-apps.md

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
ankurk91 / mac-apps.md
Last active Jul 23, 2019
Mac OS 10.14 Apps and configs
View mac-apps.md

macOS Apps

Homebrew

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

# Install homebrew iteself
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@ankurk91
ankurk91 / toggle.sh
Created Jun 22, 2017
Toggle an entry from your /etc/hosts
View toggle.sh
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Toggle entry from /etc/hosts
# PATH TO YOUR HOSTS FILE
ETC_HOSTS="/etc/hosts"
# DEFAULT IP FOR HOST_NAME
@ankurk91
ankurk91 / axios-dev-interceptors.js
Last active Apr 2, 2019
axios logger (Interceptors)
View axios-dev-interceptors.js
// axios development only interceptors
// https://github.com/mzabriskie/axios#interceptors
/**
* Strip baseURL from URL
*
* @param config Object
* @returns String
*/
function getUrl(config) {
@ankurk91
ankurk91 / bash_profile.md
Last active May 25, 2019
:octocat: Git branch name in Linux/Mac Terminal
View bash_profile.md

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
ankurk91 / github_gpg_key.md
Last active Sep 14, 2019
Github : Signing commits using GPG (Ubuntu/Mac)
View github_gpg_key.md

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/
@ankurk91
ankurk91 / xdebug-mac.md
Last active Sep 8, 2019
php xDebug on Ubuntu/Mac and phpStorm 2019
View xdebug-mac.md

🐞 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.php.net
pecl clear-cache
You can’t perform that action at this time.