Skip to content

Instantly share code, notes, and snippets.

@tssmits
tssmits / osx_bootstrap.sh
Last active November 20, 2017 10:56 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
@tssmits
tssmits / server-cheatsheet.md
Last active July 20, 2023 11:17
server cheatsheet

Add sudo user in Ubuntu:

adduser username
usermod -aG sudo username

Enable git credentials store:

git config --global credential.helper store

@tssmits
tssmits / wget-site-downloader.md
Last active July 5, 2018 15:37
Download all the files!

wget -r -p -U Mozilla --adjust-extension --wait=10 --limit-rate=35K //example.com

-r recursive

-p
--page-requisites This option causes Wget to download all the files that are necessary to properly display a given HTML page. This includes such things as inlined images, sounds, and referenced stylesheets.

@tssmits
tssmits / ignore_psycopg2_warnings.py
Created February 4, 2019 11:00
ignore psycopg2 warnings
def ignore_psycopg2_warnings():
import warnings
warnings.filterwarnings("ignore", message="The psycopg2 wheel package will be renamed from release 2.8;")
@tssmits
tssmits / list.txt
Last active August 7, 2019 07:34
list of jetbrains shell scripts (currently incomplete)
appcode
charm
idea
rubymine
phpstorm
pstorm
pycharm
webstorm
@tssmits
tssmits / gist:60201ee36a88d35aefb78a13177f9829
Created July 15, 2019 13:37
install psycopg2 on macOS mojave
LDFLAGS='-L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib' pipenv run pip install psycopg2
@tssmits
tssmits / gist:93ffe5b4284de90ab31e7da026764d55
Created August 9, 2019 08:57
install psycopg2 on macOS
env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip install psycopg2
@tssmits
tssmits / create-extension-postgis.sql
Last active October 23, 2019 14:04
PostGIS on AWS RDS Postgresql instance.
-- Code copied from
-- https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.PostGIS
-- And slightly altered by me (drop if exists etc.)
create extension if not exists postgis;
create extension if not exists fuzzystrmatch;
create extension if not exists postgis_tiger_geocoder;
create extension if not exists postgis_topology;
alter schema tiger owner to rds_superuser;