Skip to content

Instantly share code, notes, and snippets.

View ampledata's full-sized avatar

Greg Albrecht W2GMD ampledata

View GitHub Profile
@ampledata
ampledata / aprs_thread.py
Last active November 10, 2015 20:35
Threading APRS
#!/usr/bin/env python
import threading
import aprs
class APRSMessage(object):
def __init__(self):
#!/usr/bin/env python
import logging
import kiss
import kiss.constants
# Change the constants here:
kiss.constants.LOG_LEVEL = logging.DEBUG
# or, to change the log format
mycall W2GMD-6
<aprsis>
server igates.aprs.fi
heartbeat-timeout 70
filter m/150
login W2GMD-6
passcode xxx
</aprsis>
<logging>
pidfile /var/run/aprx.pid
@ampledata
ampledata / util_client.py
Created April 10, 2015 19:48
Example of decoding AX.25/APRS frame using the APRS Python Module utils
#!/usr/bin/env python
import aprs
TEST_FRAMES = 'tests/test_frames.log'
test_frames = open(TEST_FRAMES, 'r')
@ampledata
ampledata / gist:48d7cfe984a8dba37dfd
Created December 14, 2014 10:18
example nano script
import pygatt
str_buf = ''
def print_str_buf(x,y):
global str_buf
str_y = "%s" % y
if str_y == '$':
print str_buf
sb = str_y
else:
@ampledata
ampledata / gist:b834e2618fef7dba2d3a
Last active August 29, 2015 14:02
Berkshelf.lock usage pattern

Goal

We'd like changes to our Cookbooks to be automatically tested and deployed using our CI system. Additionally, these Cookbooks must also be automatically propagated to our end-users (developers).

Workflow (today)

Our current workflow is as follows:

  1. Jim, the developer, commits a change to the webapp Cookbook, and pushes that change to Github.
  2. Jenkins, the Continuous Integration system, checks-out the updated webapp Cookbook repo and runs its tests using test-kitchen.
ok, trying to come up with a strategy here. I need to setup a subdomain for staging, based on your suggestion here's what I'm thinking:
dns_rr_creator 'create DNS RR for our server based on env' do
rr [node.chef_environment, node['site']].join('.')
ip node['ip_address']
end
{
"name": "staging",
"default_attributes": {
"site": "api.staging.example.com"
},
"json_class": "Chef::Environment",
"chef_type": "environment"
}
000015-RT6YWB-9EYV8H-DCW8UZ-VM9UVJ-0E5X0V-ENA0XG-K4VFH0-6NANKH-XFZVJ0
@ampledata
ampledata / aprx.conf
Last active December 17, 2015 21:39
My W2GMD-6 digi/igate aprx.conf
mycall W2GMD-6
<aprsis>
server igates.aprs.fi
heartbeat-timeout 70
filter "p/B2B/WB6RC/W2GMD b/WB6RC*/W2GMD*"
</aprsis>