Personal Mastodon instance guide (a minimal Mastodon on EC2) https://gist.github.com/AndrewKvalheim/a91c4a4624d341fe2faba28520ed2169
Installing Mastodon (official guide) https://docs.joinmastodon.org/admin/install/
| // cc $(pkg-config --cflags --libs libudev) udev_find_serial_by_vid_pid.c -o udev_find_serial_by_vid_pid | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <libudev.h> | |
| int main(int argc, char **argv) | |
| { | |
| if (argc != 3) { |
Personal Mastodon instance guide (a minimal Mastodon on EC2) https://gist.github.com/AndrewKvalheim/a91c4a4624d341fe2faba28520ed2169
Installing Mastodon (official guide) https://docs.joinmastodon.org/admin/install/
| U-Boot 1.1.1(1-16-3-0.9), Build: 0.9 | |
| MPC8272 Reset Status: External Soft, External Hard | |
| MPC8272 Clock Configuration | |
| - Bus-to-Core Mult 3x, VCO Div 4, 60x Bus Freq 16-50 , Core Freq 50-150 | |
| - dfbrg 1, corecnf 0x10, busdf 3, cpmdf 1, plldf 0, pllmf 3 | |
| - vco_out 400000000, scc_clk 100000000, brg_clk 25000000 | |
| - cpu_clk 300000000, cpm_clk 200000000, bus_clk 100000000 | |
| - pci_clk 33333333 |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
| require 'ipaddr' | |
| sum = 0 | |
| File.open("us-military-dod.csv").each_line do |line| | |
| ip1, ip2 = line.split(/;/) | |
| sum += IPAddr.new(ip2).to_i - IPAddr.new(ip1).to_i | |
| end | |
| puts sum |
| #!/usr/bin/env ruby | |
| # | |
| # Script to decrypt (and reencrypt) Linksys EA3500 v1.0 configuration file backups, e.g., | |
| # Linksys_EA3500V1_v1.0.30.126544.cfg . The result of decryption is a plain text nvram dump that | |
| # can be edited, re-encrypted, and uploaded back into the router. | |
| # | |
| # Depends on Ruby 1.9 and an openssl command line binary. | |
| require 'optparse' | |
| require 'tempfile' |