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
tba |
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/bash | |
# Installs and configures gpsd and chrony to update the system clock via GPS when network unavailable. | |
# Thanks to OH8STN & G4WNC https://photobyte.org/raspberry-pi-stretch-gps-dongle-as-a-time-source-with-chrony-timedatectl/ | |
# TODO: Add sanity checks to make sure steps go as planned (e.g. detect GPS actually working, detect NMEA listed in chronyc sources) | |
read -p 'Please close any other programs using your gps device and then hit Enter to continue.' gogo; | |
sudo apt -y install gpsd chrony; #gpsd-clients | |
# Consider auto-detecting with grepping for 'source "/dev/tty.*" added' in dmesg output to make useful not only for IC-705 |
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
{ | |
"mycall": "YourCallsignHere", | |
"secure_login_password": "YourWinlinkPasswordHere", | |
"auxiliary_addresses": [], | |
"locator": "YourGridSquareHere", | |
"service_codes": [ | |
"PUBLIC" | |
], | |
"http_addr": "localhost:8080", | |
"motd": [ |
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
File.read!("advent_input_day1.txt") | |
|> String.split | |
|> Enum.map(&String.to_integer/1) | |
#|> Enum.reduce(&(&1 + &2)) | |
|> Enum.sum | |
|> IO.puts |
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
func ScanRangeTwo(min, max, num_threads int) (open_ports []string) { | |
open_ch := make(chan []string, num_threads) | |
high := min - 1 | |
for i := 0; i < num_threads; i++ { | |
low := high + 1 | |
high = min + (i+1)*(max-min)/num_threads | |
//fmt.Printf("Child #%d should scan %d through %d\n", i+1, low, high) | |
go CheckRange(open_ch, low, high) | |
} | |
for i := 0; i < num_threads; i++ { |
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
# This is probably the right way to divide work. | |
# At least I think it's better than they I had done it previously in port_scanner.py, | |
# and I'll fix port_scanner.py to use the below method. | |
# Kudos to this question and answer for the better way to get intersecting points in | |
# a range for an arbitrary number of sections: | |
# https://stackoverflow.com/questions/20925175/evenly-distribute-x-values-within-a-given-range#20925282 | |
# I played around a while with that and combined it to the way I distributed work in my Elixir port scanner to eventually | |
# arrive at the below solution. | |
def child(host, low, high): |
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
set -g prefix C-a | |
bind-key C-a last-window | |
bind-key a send-prefix |
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
<? | |
// Dec 2013 - CarpeNoctem | |
// Like array_pop(), for a specific array element instead of the very last one. | |
function pull(&$array,$key) | |
{ | |
$ret = $array[$key]; | |
unset($array[$key]); | |
return($ret); | |
} |