Skip to content

Instantly share code, notes, and snippets.

View behconsci's full-sized avatar
👨‍💻
coding the shit ouf of ideas

Doniyor Jurabayev behconsci

👨‍💻
coding the shit ouf of ideas
  • Humanity
  • Virgo Supercluster, Local Group, the Milky Way, ..., Earth
View GitHub Profile
@behconsci
behconsci / git-clearHistory
Created June 2, 2019 08:34 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@behconsci
behconsci / AmazonLinux-InstallPostGIS.sh
Created May 26, 2019 00:34 — forked from johnjreiser/AmazonLinux-InstallPostGIS.sh
Script to install PostgreSQL 10 and PostGIS 2.5 on fresh Amazon Linux 2
#!/bin/bash
# Script to install PostgreSQL 10 and PostGIS 2.5 on fresh Amazon Linux 2
# Installing from source:
# - GEOS 3.7.1
# - GDAL 2.4.0
# - PostGIS 2.5.1
set -e
sudo amazon-linux-extras install postgresql10 vim epel -y
@behconsci
behconsci / raymondh_tweet.txt
Created September 12, 2018 19:24
Writing production python code
* Simplest thing that works
* Consider type signatures
* Add repr, copy, and pickle support.
* Watch out for circular references
* Think hard about concurrency
* Handle exotic and unanticipated use cases
* Learn from the experience
* Repeat
@behconsci
behconsci / push_new_docker_image_to_ecr.sh
Created January 16, 2018 14:27
replace the AWS_ACCOUNT_ID with aws-account-id
#!/bin/sh
git_commit_hash=$1
echo "get new login token ... "
$(aws ecr get-login --region eu-central-1 --no-include-email)
. stop_local.sh
@behconsci
behconsci / install.sh
Created January 16, 2018 14:23 — forked from ihor/install-rabbitmq-on-amazon-linux.sh
Install RabbitMQ on Amazon Linux
# Modify /etc/yum.repos.d/epel.repo. Under the section marked [epel], change enabled=0 to enabled=1.
sudo yum install erlang --enablerepo=epel
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.1/rabbitmq-server-3.1.1-1.noarch.rpm
sudo rpm -Uvh rabbitmq-server-3.1.1-1.noarch.rpm
# Enable managament plugin
sudo rabbitmq-plugins enable rabbitmq_management
@behconsci
behconsci / aws_class.py
Created December 24, 2017 09:34
AWS Class with aws services
class AWS(object):
def __init__(self):
self.aws_session = boto3.Session(
aws_access_key_id=settings.AWS_ACCESS_KEY,
aws_secret_access_key=settings.AWS_SECRET_KEY,
region_name='eu-central-1'
) # todo: offload these credentials to external locations e.g. OS Keychain