Skip to content

Instantly share code, notes, and snippets.

@skord
skord / scanner.md
Created June 1, 2020 20:43
How to make a scanner

You can buy a really expensive police scanner and listen to a channel at a time, or buy several expensive scanners and listen to a few. Then you'll still need some sort of way of recording them and well, it's all a mess.

With a powered USB hub, some cheap software defined radios (re-purposed european tv tuners really), antennas, and a raspberry PI (or other linux box) you can build a scanner that will receive, decode, and record every single conversation happening on every talk group that your radios are configured to recieve.

So yeah:

  • Powered USB hub with enough space between ports and enough ports to fit all your SDR dongles.
  • Enough SDR Dongles to cover the frequency plan for the trunk group you want to monitor.
  • Optional shortish USB extension cables
  • Maybe not optional RF bandpass modules (in case your local AM/FM signals are too hot and causing interference)
# have this dep for dev AND test, not just test
# https://github.com/lpil/mix-test.watch/blob/master/lib/mix_test_watch/path.ex
defmodule Foobar.Recompiler do
use GenServer
def start_link(args) do
GenServer.start_link(__MODULE__, args)
end
20:10:13 238 but it missed.
20:10:13 238 Alice attacks Bob
20:10:13 238 it has no effect.
20:10:13 238
20:10:13 238 ["Alice: 10", "Bob: 10", "Charlie: 10"]
20:10:13 238
20:10:13 238 but it missed.
20:10:13 238 Bob attacks Charlie
20:10:13 238 it has no effect.
20:10:13 238
@AJFaraday
AJFaraday / turn.rb
Created April 10, 2017 16:23
Example usage pattern
# Previous example in github.com/ajfaraday/re-rpg in script/simple_battle.rb
character.actions
# [:attack, :fire, :block, :heal, :"full heal"]
character.action(:attack, target)
# purely hypothetical, mostly unimplemented
@xaviershay
xaviershay / rewrite.rb
Created January 10, 2013 06:11
Proof-of-concept squid proxy settings for proxying http://rubygems.org/ Tested on one project on my local machine both cold, and warm with internet turned off.
#!/usr/bin/env ruby
# url rewriter for rubygems squid proxy
STDOUT.sync = true
while line = gets
url = line.split(' ')[0]
# Cargo-culted this conditional, not sure if it is necessary
response = if url
@oneblackcrayon
oneblackcrayon / mc-jumpstart.html
Created April 11, 2012 03:33
Mailchimp Variable Content Jumpstart Code
<!-- use this code to jumpstart your variable content block supported email template for Mailchimp -->
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" mc:repeatable="first-repeater" mc:variant="one">
<tr>
<td>
<!-- HTML code goes here -->
@MoriTanosuke
MoriTanosuke / cleanup.rb
Created March 18, 2012 16:52
Delete all your tweets from Twitter with Ruby
require 'twitter'
require 'peach'
USERNAME = '' # put your twitter username here
Twitter.configure do |config|
config.consumer_key = YOUR_CONSUMER_KEY
config.consumer_secret = YOUR_CONSUMER_SECRET
config.oauth_token = YOUR_OAUTH_TOKEN
config.oauth_token_secret = YOUR_OAUTH_SECRET
@metaskills
metaskills / wait_until.rb
Last active May 2, 2024 01:51
Never sleep() using Capybara!
# WAIT! Do consider that `wait` may not be needed. This article describes
# that reasoning. Please read it and make informed decisions.
# https://www.varvet.com/blog/why-wait_until-was-removed-from-capybara/
# Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations?
describe 'Modal' do
should 'display login errors' do
visit root_path