export PATH=~/bin:/usr/local/bin:/usr/local/mysql/bin:/usr/local/sbin:$PATH | |
export EDITOR=vim | |
export APPLICATION_ENV="development" | |
export CLICOLOR=1 | |
export LSCOLORS=dxfxcxdxbxegedabagacad | |
alias composer="php /usr/local/bin/composer.phar" | |
_complete_ssh_hosts () | |
{ |
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
iptables -I OUTPUT -o tun+ -j ACCEPT | |
iptables -I INPUT -i tun+ -m state --state ESTABLISHED,RELATED -j ACCEPT | |
iptables -I FORWARD -o tun+ -j ACCEPT | |
iptables -I FORWARD -i tun+ -m state --state ESTABLISHED,RELATED -j ACCEPT | |
iptables -t nat -I POSTROUTING -o tun+ -j MASQUERADE |
-- Please set your vpn connection name and password here | |
set VPNName to "VPN name" | |
set VPNpassword to "VPN password" | |
tell application "System Events" | |
tell current location of network preferences | |
set VPNService to service VPNName | |
end tell | |
set isConnected to connected of current configuration of VPNService |
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
- It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
- It is free, with no quotas.
- Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
- homebrew
- micromamba
- Chrome # manual install because brew version doesn't work with 1Password
- File-up
Set a host
file.
#!/usr/bin/env python | |
# Script: remove_jpg_if_raw_exists.py | |
# | |
# Description: This script looks in all sub directories for | |
# pairs of JPG and RAW files. | |
# For each pair found the JPG is moved to a | |
# waste basket directory. | |
# Otherwise JPG is kept. | |
# | |
# Author: Thomas Dahlmann |
This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.
Install Raspbian Jessie (2016-05-27-raspbian-jessie.img
) to your Pi's sdcard.
Use the Raspberry Pi Configuration tool or sudo raspi-config
to:
This gist contains all the OpenWRT configuraion files needed to connect to Private Internet Access (PIA) VPN servers. The following files are included:
network
: contains configuration to add a virtual network device (i.e.tun1366
) and custom DNS serversopenvpn
: OpenVPN configuration file to connect to PIA VPN serversfirewall
: firewall configuration which passes all traffic through VPN and rejects any request when OpenVPN is down
NOTE: there are a number of other files required to be available under /etc/openvpn
for this approach to work:
pia.auth
: VPN credentials in two lines, first the username and the second the password