- Do you have an Github account ? If not create one.
- Install required tools
- Latest Git Client
- gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
#!/bin/bash | |
# Referenced and tweaked from http://stackoverflow.com/questions/6174220/parse-url-in-shell-script#6174447 | |
proto="$(echo $1 | grep :// | sed -e's,^\(.*://\).*,\1,g')" | |
# remove the protocol | |
url="$(echo ${1/$proto/})" | |
# extract the user (if any) | |
userpass="$(echo $url | grep @ | cut -d@ -f1)" | |
pass="$(echo $userpass | grep : | cut -d: -f2)" | |
if [ -n "$pass" ]; then |
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
sudo tar -xf Franz-linux-x64-0.9.10.tgz -C /opt/franz
wget "https://cdn-images-1.medium.com/max/360/1*v86tTomtFZIdqzMNpvwIZw.png" -O franz-icon.png
then sudo cp franz-icon.png /opt/franz
sudo touch /usr/share/applications/franz.desktop
then sudo vim /usr/share/applications/franz.desktop
paste the following lines into the file, then save the file:
[Desktop Entry]
Name=Franz
Comment=
#!/bin/bash | |
### Google Domains provides an API to update a DNS "Syntheitc record". This script | |
### updates a record with the script-runner's public IP, as resolved using a DNS | |
### lookup. | |
### | |
### Google Dynamic DNS: https://support.google.com/domains/answer/6147083 | |
### Synthetic Records: https://support.google.com/domains/answer/6069273 | |
USERNAME="" |
# prompt color and format variables | |
# A color init string consists of one or more of the following numeric codes: | |
# * Attribute codes: | |
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed | |
# * Text color codes: | |
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white | |
# * Background color codes: | |
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white | |
# * Extended color codes for terminals that support more than 16 colors: |
/** | |
* Check if a given ip is in a network | |
* @param string $ip IP to check in IPV4 format eg. 127.0.0.1 | |
* @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed | |
* @return boolean true if the ip is in this range / false if not. | |
*/ | |
function ip_in_range( $ip, $range ) { | |
if ( strpos( $range, '/' ) == false ) { | |
$range .= '/32'; | |
} |
cat >/etc/apt/preferences.d/saucy-proposed <\EOF | |
Package: * | |
Pin: release a=saucy-proposed | |
Pin-Priority: 400 | |
EOF | |
cat >/etc/apt/sources.d/saucy-proposed.list <\EOF | |
deb http://us.archive.ubuntu.com/ubuntu/ saucy-proposed main restricted universe | |
deb-src http://us.archive.ubuntu.com/ubuntu/ saucy-proposed main restricted universe |