See Amazon tutorial: Getting Started with Amazon EC2 Linux Instances
See Amazon tutorial: Installing a LAMP Web Server on Amazon Linux
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
from BeautifulSoup import BeautifulSoup | |
import requests | |
import urlparse | |
URL = 'example.com' | |
s = requests.Session() | |
def fetch(url, data=None): | |
if data is None: | |
return s.get(url).content |
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
#!/usr/bin/env python | |
'''Using Webhook and self-signed certificate''' | |
# This file is an annotated example of a webhook based bot for | |
# telegram. It does not do anything useful, other than provide a quick | |
# template for whipping up a testbot. Basically, fill in the CONFIG | |
# section and run it. | |
# Dependencies (use pip to install them): | |
# - python-telegram-bot: https://github.com/leandrotoledo/python-telegram-bot |
Backup: | |
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
Restore: | |
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres |
See Amazon tutorial: Getting Started with Amazon EC2 Linux Instances
See Amazon tutorial: Installing a LAMP Web Server on Amazon Linux
git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )
This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.
#!/usr/bin/env python3 | |
# !! NOTE - this script is no longer maintained... please see the repo for further | |
# updates: https://github.com/jheddings/notes2notion | |
# this script attempts to migrate from Apple Notes to Notion while retaining as | |
# much information and formatting as possible. there are limitations to the | |
# export data from Notes, so we try to preserve the intent of the original note. | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, |