Skip to content

Instantly share code, notes, and snippets.

View cisene's full-sized avatar
😀
I may be slow to respond.

Christopher Isene cisene

😀
I may be slow to respond.
View GitHub Profile
// 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) {
@johnspurlock-skymethod
johnspurlock-skymethod / mastodon-on-ec2.md
Last active May 10, 2022 12:22
Quickstart for installing a small Mastodon server on Amazon EC2
@Crazor
Crazor / uboot
Created March 12, 2020 07:05
ZP120 serial
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
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active July 5, 2024 10:02
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

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.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@jonelf
jonelf / dodips.rb
Created September 24, 2015 15:44
Number of IPs owned by DoD
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
@dwalters-zz
dwalters-zz / linksys-config.rb
Created June 14, 2012 16:42
Script to encrypt/decrypt config backups of a Linksys EA3500 V1 router (on stock firmware.)
#!/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'