Skip to content

Instantly share code, notes, and snippets.

Avatar
💤
Slow to respond

Ankur Kumar ankurk91

💤
Slow to respond
View GitHub Profile
@ankurk91
ankurk91 / laravel-project.conf
Last active Mar 2, 2022
Ngnix conf with php on Ubuntu 20.4
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
ankurk91 / docker-compose.yml
Last active Dec 30, 2021
My docker compose for local development
View docker-compose.yml
version: "3"
services:
postgres14:
image: 'nickblah/postgis:14-postgis-3'
container_name: postgres-14
restart: unless-stopped
ports:
- "${FORWARD_PGSQL_PORT:-5432}:5432"
volumes:
@ankurk91
ankurk91 / dnsmasq.md
Last active Jan 8, 2022
DNSmasq on Ubuntu 18/20
View dnsmasq.md

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
ankurk91 / phpstorm-install.sh
Last active Mar 7, 2022
Install Postman, PhpStorm on Ubuntu Linux (no snaps)
View phpstorm-install.sh
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Run this script without sudo
# bash script_name.sh
INSTALL_TMP_DIR=~/phpstorm-tmp
mkdir -p $INSTALL_TMP_DIR
@ankurk91
ankurk91 / postgresql-ubuntu.md
Last active Apr 10, 2022
PostgreSQL Database on Ubuntu 20
View postgresql-ubuntu.md

PostgreSQL on Ubuntu

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

Add PPA Source

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
@ankurk91
ankurk91 / laravel_horizon.md
Last active Jun 19, 2022
Laravel Horizon, redis-server, supervisord on Ubuntu 20 server
View laravel_horizon.md

Laravel Horizon, redis-server, supervisord on Ubuntu server

Laravel 8+, Horizon 5.x, Redis 6.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

@ankurk91
ankurk91 / 1-elementary-os-apps.md
Last active Mar 24, 2022
elementary OS 5.1 Hera
View 1-elementary-os-apps.md

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
ankurk91 / mac-apps.md
Last active May 17, 2021
Mac OS 10.15 Apps and configs
View mac-apps.md

macOS Apps

⚠️ No longer maintained! ⚠️

Homebrew

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

# Install homebrew iteself
@ankurk91
ankurk91 / bash_profile.md
Last active Apr 3, 2022
:octocat: Git branch name in Linux/Mac Bash Terminal
View bash_profile.md

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
ankurk91 / github_gpg_key.md
Last active Jul 1, 2022
Signing git 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/