Skip to content

Instantly share code, notes, and snippets.

View adv27's full-sized avatar
🎯
Focusing

Dinh-Anh Vu adv27

🎯
Focusing
View GitHub Profile
@adv27
adv27 / git-ssh-error-fix.sh
Created December 12, 2020 22:12 — forked from Tamal/git-ssh-error-fix.sh
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out
$ # but this might work
@adv27
adv27 / semantic-commit-messages.md
Created December 9, 2020 03:53 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@adv27
adv27 / merge-geojsons.py
Created December 3, 2019 15:17 — forked from migurski/merge-geojsons.py
Merge multiple GeoJSON files into one
from json import load, JSONEncoder
from optparse import OptionParser
from re import compile
float_pat = compile(r'^-?\d+\.\d+(e-?\d+)?$')
charfloat_pat = compile(r'^[\[,\,]-?\d+\.\d+(e-?\d+)?$')
parser = OptionParser(usage="""%prog [options]
Group multiple GeoJSON files into one output file.
@adv27
adv27 / merge-geojsons.py
Created December 3, 2019 15:17 — forked from migurski/merge-geojsons.py
Merge multiple GeoJSON files into one
from json import load, JSONEncoder
from optparse import OptionParser
from re import compile
float_pat = compile(r'^-?\d+\.\d+(e-?\d+)?$')
charfloat_pat = compile(r'^[\[,\,]-?\d+\.\d+(e-?\d+)?$')
parser = OptionParser(usage="""%prog [options]
Group multiple GeoJSON files into one output file.
@adv27
adv27 / daphne_worker.config
Created August 3, 2019 23:19 — forked from mav-erick/daphne_worker.config
Daphne and worker processes managed by supervisord on AWS Elastic Beanstalk
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/run_supervised_daemon.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
# Get django environment variables
djangoenv=`cat /opt/python/current/env