Skip to content

Instantly share code, notes, and snippets.

@keithah
keithah / gist:7760879
Created December 2, 2013 23:16
fitbit woes in slogger
mba:plugins_disabled keith$ cp fitbit.rb ../plugins
mba:plugins_disabled keith$ cd ..
mba:Slogger keith$ ./slogger -o fitbit
Initializing Slogger v2.1 (2.1.0.6)...
15:14:27 FitbitLogger:
15:14:27 FitbitLogger: Logging Fitbit summary for 2013-12-02
/Users/keith/Slogger/plugins/fitbit.rb:113:in `do_log': undefined method `[]' for nil:NilClass (NoMethodError)
from /Users/keith/Slogger/slogger.rb:257:in `block in run_plugins'
from /Users/keith/Slogger/slogger.rb:244:in `each'
from /Users/keith/Slogger/slogger.rb:244:in `run_plugins'
mba:Slogger keith$ ./slogger -o fitbit
Initializing Slogger v2.1 (2.1.0.6)...
15:36:12 FitbitLogger: 9de2a48693f426d45b02814a957b4787
15:36:12 FitbitLogger: Logging Fitbit summary for 2013-12-02
/Library/Ruby/Gems/2.0.0/gems/fitgem-0.8.0/lib/fitgem/helpers.rb:131:in `label_for_measurement': The select unit system must be one of [ApiUnitSystem.US, ApiUnitSystem.UK, ApiUnitSystem.METRIC], current value is US (Fitgem::InvalidUnitSystem)
from /Users/keith/Slogger/plugins/fitbit.rb:116:in `do_log'
from /Users/keith/Slogger/slogger.rb:257:in `block in run_plugins'
from /Users/keith/Slogger/slogger.rb:244:in `each'
from /Users/keith/Slogger/slogger.rb:244:in `run_plugins'
from /Users/keith/Slogger/slogger.rb:388:in `<top (required)>'
@keithah
keithah / gist:10305151
Created April 9, 2014 19:20
levenshtein won't install for slogger
mba:tmp keith$ sudo gem install levenshtein
Building native extensions. This could take a while...
ERROR: Error installing levenshtein:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for main() in -llevenshtein_array... no
checking for main() in -llevenshtein_array_of_strings... no
checking for main() in -llevenshtein_generic... no
checking for main() in -llevenshtein_string... no
mba:Slogger keith$ ./slogger -o twitterlogger -t 10
Initializing Slogger v2.1 (2.1.0.11)...
14:58:18 TwitterLogger: Getting Twitter timeline for keithah
Faraday::Builder is now Faraday::RackBuilder.
14:58:18 TwitterLogger: Getting Twitter favorites for keithah
/Library/Ruby/Gems/2.0.0/gems/twitter-5.5.1/lib/twitter/entities.rb:42:in `uris': To get urls, you must pass `:include_entities => true` when requesting the Twitter::Tweet.
/Library/Ruby/Gems/2.0.0/gems/twitter-5.5.1/lib/twitter/entities.rb:28:in `media': To get media, you must pass `:include_entities => true` when requesting the Twitter::Tweet.
/Library/Ruby/Gems/2.0.0/gems/twitter-5.5.1/lib/twitter/entities.rb:42:in `uris': To get urls, you must pass `:include_entities => true` when requesting the Twitter::Tweet.
/Library/Ruby/Gems/2.0.0/gems/twitter-5.5.1/lib/twitter/entities.rb:28:in `media': To get media, you must pass `:include_entities => true` when requesting the Twitter::Tweet.
14:58:19 DayOne: =====[ Saving en
keith@sea:~/tmp/Comskip$ make
cc -c -g -pipe -Wall -W -Wno-unused-parameter -Wno-unused-label -O2 -DDONATOR -DPROCESS_CC -I. -o comskip.o comskip.c
comskip.c:675:24: error: expected declaration specifiers or ‘...’ before numeric constant
static DECLARE_ALIGNED(32, long, histogram[256]);
^
comskip.c:675:34: error: unknown type name ‘histogram’
static DECLARE_ALIGNED(32, long, histogram[256]);
^
comskip.c:676:24: error: expected declaration specifiers or ‘...’ before numeric constant
static DECLARE_ALIGNED(32, long, lastHistogram[256]);
cc -c -g -pipe -Wall -W -Wno-unused-parameter -Wno-unused-label -O2 -DDONATOR -DPROCESS_CC -I. -I/opt/ffmpeg/include -o ccextratorwin/general_loop.o ccextratorwin/general_loop.c
In file included from ccextratorwin/general_loop.c:2:0:
ccextratorwin/general_loop.c: In function ‘ts_getmoredata’:
ccextratorwin/general_loop.c:295:21: warning: the address of ‘tsheader’ will always evaluate as ‘true’ [-Waddress]
buffered_read_4(tsheader);
^
ccextratorwin/ccextractor.h:149:9: note: in definition of macro ‘buffered_read_4’
if (buffer) { buffer[0]=filebuffer[filebuffer_pos]; \
^
ccextratorwin/ccextractor.h:143:15: warning: the comparison will always evaluate as ‘true’ for the address of ‘adlength’ will never be NULL [-Waddress]
@keithah
keithah / gist:9dd4b686186a554ab51945b924b2cfa0
Created February 16, 2017 07:41
AVerMedia H837-A USB Hybrid ATSC/QAM in Android
[ 115.722716] usb 2-3: new high-speed USB device number 5 using tegra-xhci
[ 115.747291] usb 2-3: New USB device found, idVendor=07ca, idProduct=0837
[ 115.747302] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 115.747310] usb 2-3: Product: AVerMedia H837 USB Hybrid ATSC/QAM
[ 115.747317] usb 2-3: Manufacturer: AVerMedia TECHNOLOGIES, Inc.
[ 115.747323] usb 2-3: SerialNumber: 201014400219
[ 115.754618] cx231xx #0: New device AVerMedia TECHNOLOGIES, Inc. AVerMedia H837 USB Hybrid ATSC/QAM @ 480 Mbps (07ca:0837) with 6 interfaces
[ 115.754628] cx231xx #0: registering interface 1
[ 115.754726] cx231xx #0: Identified as AVerMedia H837-A USB Hybrid ATSC/QAM (card=19)
[ 115.775027] cx231xx #0: Correct device model as AVerMedia H837-B USB Hybrid ATSC/QAM
@keithah
keithah / gist:dbbd554ef6060d5370ec08249f2b2c05
Created February 16, 2017 07:47
Hauppauge WinTV-dualHD ATSC
[ 488.852741] usb 2-3: new high-speed USB device number 6 using tegra-xhci
[ 488.874267] usb 2-3: New USB device found, idVendor=2040, idProduct=026d
[ 488.874275] usb 2-3: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[ 488.874282] usb 2-3: Product: 955D
[ 488.874287] usb 2-3: Manufacturer: HCW
[ 488.874292] usb 2-3: SerialNumber: 0013811247
[ 488.875108] em28xx: New device HCW 955D @ 480 Mbps (2040:026d, interface 0, class 0)
[ 488.875116] em28xx: DVB interface 0 found: isoc
[ 488.875254] em28xx: chip ID is em28174
[ 489.300784] [TLK] [hdcp_service] Checked invalid state in command:8, state:4
@keithah
keithah / gist:f1b82fdaabd569636cd4dd29597c7a4b
Created February 16, 2017 07:49
TVH errors w/ Hauppauge WinTV-dualHD ATSC
2017-02-16 07:28:01.000 [ INFO] mpegts: 731MHz in ATSC Antenna - tuning on LG Electronics LGDT3306A VSB/QAM Frontend : ATSC-T #0
2017-02-16 07:28:01.000 [ ERROR] linuxdvb: LG Electronics LGDT3306A VSB/QAM Frontend : ATSC-T #0 - DTV_CLEAR failed [e=Not a tty]
2017-02-16 07:28:01.001 [ INFO] mpegts: 725MHz in ATSC Antenna - tuning on LG Electronics LGDT3306A VSB/QAM Frontend : ATSC-T #0
2017-02-16 07:28:01.001 [ ERROR] linuxdvb: LG Electronics LGDT3306A VSB/QAM Frontend : ATSC-T #0 - DTV_CLEAR failed [e=Not a tty]
2017-02-16 07:28:01.001 [ INFO] mpegts: 701MHz in ATSC Antenna - tuning on LG Electronics LGDT3306A VSB/QAM Frontend : ATSC-T #0
2017-02-16 07:28:01.001 [ ERROR] linuxdvb: LG Electronics LGDT3306A VSB/QAM Frontend : ATSC-T #0 - DTV_CLEAR failed [e=Not a tty]
2017-02-16 07:28:01.002 [ INFO] mpegts: 689MHz in ATSC Antenna - tuning on LG Electronics LGDT3306A VSB/QAM Frontend : ATSC-T #0
2017-02-16 07:28:01.002 [ ERROR] linuxdvb: LG Electronics LGDT3306A VSB/QAM Frontend : ATSC-T #0 - DTV_CLE
@keithah
keithah / snapRAID_helper.sh
Created March 12, 2017 05:47 — forked from bfg100k/snapRAID_helper.sh
Bash helper script to help with the automation of routine snapRAID tasks. Add it as a cron job to automate the routine tasks of running sync and scrub. Script will optionally send you email of status and issues encountered during the run.
#!/bin/bash
#######################################################################
# This is a helper script that keeps snapraid parity info in sync with
# your data and optionally verifies the parity info. Here's how it works:
# 1) It first calls diff to figure out if the parity info is out of sync.
# 2) If parity info is out of sync, AND the number of deleted files exceed
# X (configurable), it triggers an alert email and stops. (In case of
# accidental deletions, you have the opportunity to recover them from
# the existing parity info)
# 3) If partiy info is out of sync, AND the number of deleted files exceed X