Skip to content

Instantly share code, notes, and snippets.

View skord's full-sized avatar
🤘

Mike Danko skord

🤘
  • Estuary
  • Columbus, OH, USA
View GitHub Profile
@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)
@skord
skord / Dockerfile
Created June 18, 2018 23:04
maxscale dockerfile
FROM centos:7
ENV MAXSCALE_VERSION=2.2.9
ENV MAXSCALE_PKG_REV=1
RUN yum install -y https://downloads.mariadb.com/MaxScale/${MAXSCALE_VERSION}/rhel/7/x86_64/maxscale-${MAXSCALE_VERSION}-${MAXSCALE_PKG_REV}.rhel.7.x86_64.rpm
RUN mkdir -p /tmp/maxadmin
CMD ["maxscale", "-f", "/etc/maxscale.cnf", "-l", "stdout", "-d", "-U", "root"]
{
"__inputs": [
{
"name": "DS_MARIADB",
"label": "mariadb",
"description": "",
"type": "datasource",
"pluginId": "mysql",
"pluginName": "MySQL"
}
@skord
skord / benchmark.rb
Last active April 18, 2018 18:31
MRI 2.5.1 vs jruby 9.1.16.0 vs truffleruby
require 'benchmark/ips'
require 'erb'
template = <<TEMPLATE
<html>
<head> <%= title %> </head>
<body>
<h1> <%= title %> </h1>
<p>
<%= content %>
module Mettlr
class Connection
def self.connection
@connection = Faraday.new('http://api.mettl.com/v1') do |c|
c.options.params_encoder = Faraday::FlatParamsEncoder
c.request :url_encoded
# c.request :json
c.response :mashify
c.response :json, content_type: /\bjson$/
c.response :logger
module Mettlr
class Signature
def initialize(request)
@request = request
end
def concat_string
@request.method.to_s.upcase +
"http://api.mettl.com" +
@request.path +
module Mettlr
class Connection
def self.connection
@connection = Faraday.new('http://api.mettl.com/v1') do |c|
c.options.params_encoder = Faraday::FlatParamsEncoder
c.request :url_encoded
# c.request :json
c.response :mashify
c.response :json, content_type: /\bjson$/
c.response :logger
@skord
skord / logstash.conf
Created January 24, 2017 20:47
logstash config for maxscale 2.1+
input {
tcp {
port => 5000
type => syslog
}
file {
start_position => "beginning"
path => "/var/log/maxscale/maxscale.log"
type => "maxscale"
}
------
version: '2'
services:
myapp:
image: elixer
volumes:
- "$HOME/.ssh:/home/deploymotron/.ssh"
- "$PWD:/workspace"
command: "whateverstartselixer"
ports: