Skip to content

Instantly share code, notes, and snippets.

@nomicode
nomicode / cspell.md
Last active November 9, 2023 01:15
Linters

‎‎​

@mikerr
mikerr / btSignal.sh
Last active March 31, 2024 17:18
Bluetooth RSSI signal strength
# install bluetooth tools
sudo apt-get install --no-install-recommends bluetooth
# find MAC address (needs to be discoverable)
hcitool scan
# ping it
sudo l2ping -c 1 12:34:56:78:90
# Connect by MAC
@wilkie
wilkie / experiment.rb
Created November 19, 2012 23:51
Code to produce a probability distribution of how likely a gender breakdown in conference speakers is, and also to experiment to produce the result
# This program will select at random a set of speakers and look at the gender breakdown given 20% women
total_speakers = 15
percentage_of_women = 0.25
hist, list, results = {}, [], []
(1000 * (1 - percentage_of_women)).floor.times{list << 0}
(1000 * percentage_of_women).floor.times{list << 1}
@alandipert
alandipert / opml2org.pl
Created November 14, 2010 00:03
Convert OPML to org-mode style nested headings, suitable for Confluence or Emacs
#!/usr/bin/perl
# Usage: perl opml2org.pl "My OPML File.opml"
use XML::Parser;
binmode STDOUT, ":utf8";
$xp = new XML::Parser();
$xp->setHandlers(Start => \&start, End => \&end);
$xp->parsefile($ARGV[0]);
$indent = 0;