As configured in my dotfiles.
start new:
tmux
start new with session name:
#cloud-config | |
coreos: | |
update: | |
reboot-strategy: off | |
etcd: | |
discovery: https://discovery.etcd.io/<token> | |
addr: $private_ipv4:4001 | |
peer-addr: $private_ipv4:7001 | |
fleet: |
[Unit] | |
Description=IP Lookup | |
After=docker.service | |
[Service] | |
TimeoutStartSec=0 | |
Restart=always | |
ExecStartPre=-/usr/bin/docker kill lookup | |
ExecStartPre=-/usr/bin/docker rm lookup | |
ExecStartPre=-/usr/bin/docker pull icecreammatt/lookup |
server_names_hash_bucket_size 64; | |
server { | |
listen 80; | |
server_name sample.com www.sample.com; | |
location / { | |
proxy_redirect off; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
#!/bin/bash | |
# Check to see if the data is already downloaded | |
if [[ -e ./waterData ]]; then | |
echo "Water data already downloaded reading from cache"; | |
else | |
# Data isn't downloaded so grab it from the web | |
echo "No cached data found downloading water data..."; | |
wget -O waterData "http://nwis.waterdata.usgs.gov/ca/nwis/uv/?search_station_nm=russian%20river&search_station_nm_match_type=beginning&county_cd=06097&index_pmcode_00400=1&index_pmcode_00095=1&index_pmcode_00010=1&index_pmcode_63680=1&group_key=NONE&sitefile_output_format=html_table&column_name=agency_cd&column_name=site_no&column_name=station_nm&range_selection=date_range&begin_date=2008-01-01&end_date=2008-12-31&format=rdb&date_format=YYYY-MM-DD&rdb_compression=value&list_of_search_criteria=county_cd%2Csearch_station_nm%2Crealtime_parameter_selection"; | |
# Convert line endings to unix style (The site is currently providing Windows Style) |
from ftplib import FTP | |
# Server connection string | |
remoteUrl = 'ftp.debian.org' | |
ftp = FTP(remoteUrl) | |
# Login | |
ftp.login() | |
# Switch to folder |
#!/bin/bash | |
# For each .mp4 file convert and rename to .mov | |
for x in *.mp4; do | |
ffmpeg -i $x -c:v libx264 -acodec aac -ab 192k -strict -2 -ac 2 -qp 0 ${x/.mp4/.mov}; | |
done |
#!/bin/bash | |
# Script to (decrypt encfs and) selectively sync a remote sshfs directory | |
REMOTEDIR=server:/path/to/some/encfs | |
LOCALDIR=/path/to/local/directory | |
MOUNTFUNC=_ssh+encfs | |
# verbose | |
# set -vx |
#!/bin/sh | |
tail -fn0 /var/log/file.log | while read line ; do | |
echo "$line" | grep "pattern" | |
if [ $? = 0 ] | |
then | |
echo "Log: $line" | |
fi | |
done |
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS | |
# Can retrieve cloudflare Domain id and list zone's, because, lazy | |
# Place at: | |
# /usr/local/bin/cf-ddns.sh |
As configured in my dotfiles.
start new:
tmux
start new with session name: