start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
#! /bin/bash | |
SLEEP_TIME=5 # Default time between checks. | |
SAFE_PERCENT=30 # Still safe at this level. | |
DANGER_PERCENT=15 # Warn when battery at this level. | |
CRITICAL_PERCENT=5 # Hibernate when battery at this level. | |
NAGBAR_PID=0 | |
export DISPLAY=:0.0 |
I like to manage dotfiles without having to mess with silly symlinks or having | |
to install/configure specific dotfile managament tools. So here's what I did: | |
$ cd ~ | |
$ git init . | |
$ echo '*' > .gitignore # ignore all files by default | |
$ echo '!.bashrc' >> .gitignore # ...and then tell git what files not to *not* ignore | |
$ # ...add other files you may want to track to *not* ignore | |
$ git add .bashrc # now actually add the files to git | |
$ git add .gitignore # add the .gitignore to git |
# see also https://github.com/wrobstory/pgshift | |
import gzip | |
from io import StringIO, BytesIO | |
from functools import wraps | |
import boto | |
from sqlalchemy import MetaData | |
from pandas import DataFrame | |
from pandas.io.sql import SQLTable, pandasSQL_builder |
import io | |
import sys | |
class IteratorFile(io.TextIOBase): | |
""" given an iterator which yields strings, | |
return a file like object for reading those strings """ | |
def __init__(self, it): | |
self._it = it | |
self._f = io.StringIO() |
; Configuration for Airflow webserver and scheduler in Supervisor | |
[program:airflow] | |
command=/bin/airflow webserver | |
stopsignal=QUIT | |
stopasgroup=true | |
user=airflow | |
stdout_logfile=/var/log/airflow/airflow-stdout.log | |
stderr_logfile=/var/log/airflow/airflow-stderr.log | |
environment=HOME="/home/airflow",AIRFLOW_HOME="/etc/airflow",TMPDIR="/storage/airflow_tmp" |
$ uname -r
from datetime import datetime, timedelta | |
import networkx as nx | |
from airflow import DAG | |
from airflow.operators import BashOperator, SubDagOperator | |
start_date = datetime(year=2017, month=6, day=13, hour=19, minute=0) | |
schedule_interval = '0 * * * 1-5' | |
default_args = { |