It's quite easy and the same process applies to all Firebase features with minor changes.
In order to deploy you'll need a deployment token (I named it FIREBASE_TOKEN
) and it can be
acquired by using the following command
firebase login:ci
Task: | |
Access OpenVPN or any Service on Home Network from Public Networks (Hotel) without configuring router and without static IP | |
Step 1: | |
Install OpenVPN on any device connected to Home Network (Raspberry mychoice with pivpn) | |
- Change default OpenVPN protocol from UDP to TCP (Cloudflare doesn't support UDP) | |
- Make a note of TCP port number (default is 443) | |
- Grab the OpenVPN client config file | |
Step 2: | |
Install Cloudflared on Raspberry PI | |
- Create a tunnel |
--- | |
version: "2.1" | |
services: | |
duplicati: | |
image: linuxserver/duplicati | |
container_name: duplicati | |
environment: | |
- PUID=998 | |
- PGID=100 | |
- TZ=America/Denver |
#!/bin/bash | |
declare -a ISO=("af" "au" "al" "dz" "aq" "br" "ar" "cn" "lb" "my" "ly" "lr" "la" "jp" "jm" "jo" "kz" "ke" "hk" "ml" "mx" "fm" "md" "mc" "mn" "ms" "ma" "mz" "mm" "nr" "na" "np" "nl" "an" "nc" "nz" "ni" "ne" "ng" "nu" "nf" "mp" "no" "om" "pk" "pw" "pa" "pg" "py" "pe" "ph" "pn" "pl" "pt" "pr" "qa" "re" "ro" "ru" "rw" "kn" "lc" "vc" "ws" "sm" "st" "sn" "sa" "sc" "sl" "sg" "sk" "si" "sb" "so" "za" "gs" "es" "lk" "sh" "pm" "sd" "sr" "sj" "sz" "se" "ch" "sy" "tw" "tj" "tz" "th" "tg" "tk" "to" "tt" "tn" "tr" "tm" "tc" "tv" "ug" "ua" "ae" "gb" "um" "uy" "uz" "vu" "ve" "vn" "vg" "vi" "wf" "eh" "ye" "yu" "zm" "zw" "ie" "in" "il" "ir" "hn" ) | |
declare -a zone_file_names_ext=() | |
# remove any old list that might exist from previous runs of this script | |
find /tmp -name '*.zone' -or -name '*.zone.1' | xargs rm | |
for i in "${ISO[@]}" | |
do | |
zone_file_names_ext+=( "$i.zone" ) |
It's quite easy and the same process applies to all Firebase features with minor changes.
In order to deploy you'll need a deployment token (I named it FIREBASE_TOKEN
) and it can be
acquired by using the following command
firebase login:ci
Please see the most up-to-date version of this protocol on my blog at https://darencard.net/blog/.
inotify-tools
is installed (https://github.com/rvoicilas/inotify-tools)Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
""" | |
This python script encodes all files in specified working directory. | |
Sources: http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide | |
command: python video-encode.py /dir/to/encode | |
output: /dir/to/encode/encoded | |
""" |
var earth_radius_km = 6371.0; | |
function deg_to_rad(deg) { | |
return (deg * Math.PI / 180.0); | |
} | |
function haversine_distance(latitude1, longitude1, latitude2, longitude2) { | |
var lat1 = deg_to_rad(latitude1); | |
var lng1 = deg_to_rad(longitude1); | |
var lat2 = deg_to_rad(latitude2); |
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545