Skip to content

Instantly share code, notes, and snippets.

View alpancs's full-sized avatar
🏠
Working remotely

Alfan Nur Fauzan alpancs

🏠
Working remotely
View GitHub Profile
@alpancs
alpancs / shell-alias.sh
Created November 18, 2019 05:27
the best alias for `python` command
alias python='python -ic "print(\"WARNING: Python is not recommended.\nDO NOT use Python. Bye!\nPython 3.6.8 (default, Oct 7 2019, 12:59:55) \n[GCC 8.3.0] on linux\nType \\\"help\\\", \\\"copyright\\\", \\\"credits\\\" or \\\"license\\\" for more information.\")"'
Name Description Type Default Valid Values Importance
@alpancs
alpancs / autogoimports.py
Last active October 7, 2019 02:46
run goimports automatically when saving Go code
# put this file in $HOME/.config/sublime-text-3/Packages
from sublime import *
from sublime_plugin import *
from os import environ
from subprocess import Popen, PIPE
class AutoGoimports(ViewEventListener):
@alpancs
alpancs / npt
Last active October 17, 2018 15:13
Next Prayer Time
#!bash
site="https://jadwalsholat.org/adzan/monthly.php"
npt() {
# columns: Tanggal Imsyak Shubuh Terbit Dhuha Dzuhur Ashr Maghrib Isya
# select: Shubuh Dzuhur Ashr Maghrib Isya (3 6 7 8 9)
declare -a times=(`curl -s "$site?id=$1" | grep "table_highlight" | sed "s/<[^>]*>/ /g" | awk '{print $3" "$6" "$7" "$8" "$9}'`)
declare -a names=(Shubuh Dzuhur Ashr Maghrib Isya)
now=`date +"%H:%M"`
@alpancs
alpancs / docker-compose.yml
Last active February 8, 2019 03:22
all in one services
version: "3"
services:
beanstalkd:
container_name: beanstalkd
image: schickling/beanstalkd
network_mode: host
restart: always
cassandra: