Badminton Score Tracker (store link)
Where am I? (store link)
Fenix3 Golf Distance
HRCircles
Packman
Android Bluetooth Debugging
- In developer options, turn on "Enable Bluetooth HCI snoop log". Will create a log at "/sdcard/btsnoop_hci.log"
- To download the file, "adb pull /sdcard/btsnoop_hci.log"
- To delete the file, "adb shell rm /sdcard/btsnoop_hci.log"
Open the file in Wireshark to see bluetooth packets wireshark -r btsnoop_hci.log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Caculate the BSCCO checksum for a file | |
| # Usage: `$ ruby bscco.rb your_file.txt` | |
| # Based on the algorithm description in https://www.elexon.co.uk/wp-content/uploads/2013/11/bscp533_appx_a_v17.0.pdf | |
| def bscco(file) | |
| lines_except_last = File.read(file).lines[0..-2] | |
| lines_as_bytes = lines_except_last | |
| .map(&:chomp) | |
| .map(&:bytes) | |
| .map do |line_bytes| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module CucumberStepDebugging | |
| def print_step_definitions | |
| step_definitions.each do |sdl| | |
| puts "#{sdl.regexp_source} in #{sdl.file_colon_line}" | |
| end | |
| end | |
| def step_definitions | |
| language_map = @__cucumber_runtime.instance_variable_get("@support_code").instance_variable_get("@language_map") | |
| step_definitions = language_map["rb"].instance_variable_get("@available_step_definition_hash").keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define D3 3 | |
| #define SECONDS_PER_HOUR = 3600 | |
| const int photoresistorPin = D3; | |
| const int impressionsPerkWh = 1000; | |
| volatile long readingStart = 0; | |
| volatile long readingEnd = 0; | |
| volatile boolean readingAvailable = 0; |
Wa-Tor is a population dynamics simulation devised by Alexander Keewatin Dewdney
See http://home.cc.gatech.edu/biocs1/uploads/2/wator_dewdney.pdf and https://en.wikipedia.org/wiki/Wa-Tor.
gem install curses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'sqlite3' | |
| # https://github.com/mapbox/mbtiles-spec/blob/master/1.1/spec.md | |
| class Mbtiles | |
| attr_reader :tile_format, :db_file_name | |
| def initialize(db_file_name, format=:png) | |
| @db_file_name = db_file_name | |
| load_database(db_file_name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // IRLib from https://github.com/cyborg5/IRLib | |
| #include <IRLib.h> | |
| // RGBEffects from https://github.com/ajesler/Arduino-RGBEffects | |
| #include <RGBEffects.h> | |
| // if isPaused is true, update will stop being called until the lamp is unpaused. | |
| int isPaused = 0; | |
| // the time between effect updates. | |
| int effect_delay = 2100; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'nokogiri' # swap to using REXML - may be slower but its built in to the ruby standard lib. | |
| require 'optparse' | |
| ###################################### | |
| # called like 'ruby junit-test-times.rb /home/user/project/target/surefire-reports' | |
| ###################################### | |
| class JUnitTestTimes | |
| @options = {} |