This is a short guide on how to set up an encrypted VoIP system using Twilio and Asterisk. I was a little annoyed that just about everything these days still uses unencrypted RTP for media (though just about everyone supports SIP over TLS). So I spent a weekend looking at options, and settled on a totally overkill solution involving Twilio's secure trunking to an Asterisk PBX. While all bets are off once it hits the PSTN, at least you won't be blasting your conversations over the internet in clear text.
I hereby claim:
- I am ianthetechie on github.
- I am ianthetechie (https://keybase.io/ianthetechie) on keybase.
- I have a public key ASDdy2kpjq4cdIELhui1sUnQ113bWCf7uBkDAzWipYU1mQo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# NOTE: This is super WIP and is intended to demonstrate one method of improving concurrency. | |
### | |
import io | |
import os | |
from sqlalchemy import Column, ForeignKey, Integer, String | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.orm import relationship, scoped_session, sessionmaker | |
from sqlalchemy import create_engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import timeit | |
loop_count = 100 | |
def concat_strings(): | |
out_str = "" | |
for num in range(loop_count): | |
out_str += str(num) | |
return out_str |
I have a problem. I need to run some Docker containers for work. Docker, as you may know, has a design that is tightly coupled to Linux. This is rather unfortunate since my desktop is running FreeBSD, and my laptop is running its distant cousin, macOS. Normally I'd just do such things on my Mac, but 1) my desktop has a lot more storage, and 2) the Docker images in question are amd64 already. Also I just wanted a challenge, so let's set up a VM to run Docker on FreeBSD.
Aside in case you're wondering why Docker runs on your Mac: Docker Desktop actually ships a hypervisor,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# Clears environment variables set by Xcode by taking a whitelist approach. | |
# We only need our HOME and PATH, as well as the ACTION and CONFIGURATION set by Xcode | |
env -i HOME="$HOME" PATH="$PATH" ACTION="$ACTION" CONFIGURATION="$CONFIGURATION" \ | |
/bin/zsh -l -c "$(cat <<-'END_OF_SCRIPT' | |
# Function to perform a clean build | |
clean_build() { | |
echo "Cleaning..." | |
cargo clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"routes":[{"weight_name":"auto","weight":462.665,"duration":182.357,"distance":1718.205,"legs":[{"via_waypoints":[],"admins":[{"iso_3166_1_alpha3":"USA","iso_3166_1":"US"}],"weight":462.665,"duration":182.357,"steps":[{"bannerInstructions":[{"primary":{"type":"end of road","modifier":"right","text":"John F. Kennedy Boulevard","components":[{"text":"John F. Kennedy Boulevard","type":"text"},{"text":"/","type":"delimiter"},{"text":"CR 501","type":"text"}]},"distanceAlongGeometry":64.13}],"intersections":[{"classes":["restricted"],"entry":[true],"bearings":[151],"duration":16.247,"admin_index":0,"out":0,"weight":18.684,"geometry_index":0,"location":[-74.031614,40.775707]},{"entry":[false,true,false,false],"classes":["restricted"],"in":3,"bearings":[121,175,239,331],"duration":3.995,"turn_weight":15,"turn_duration":0.035,"admin_index":0,"out":1,"weight":19.554,"geometry_index":1,"location":[-74.031354,40.775349]},{"bearings":[63,159,244,355],"entry":[false,true,false,false],"classes":["restricted"],"in":3,"turn_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"routes": [ | |
{ | |
"voiceLocale": "en-US", | |
"weight_name": "bicycle", | |
"weight": 1871.817, | |
"duration": 845.521, | |
"distance": 3716.66, | |
"legs": [ | |
{ |