Skip to content

Instantly share code, notes, and snippets.

View CloCkWeRX's full-sized avatar

Daniel O'Connor CloCkWeRX

View GitHub Profile
@nitobuendia
nitobuendia / google_fit.py
Last active August 22, 2021 15:17
Custom sensor for Home Assistant to integrate Google Fit data.
"""Creates a Google Fit sensors.
At the moment, provides two measurements:
- weight: in KG.
- last_updated: entry of the current weight point.
Sensor is designed to be flexible and allow customization to add new Google Fit
dimensions with minimal effort with relative knowledge of Python and Fitness
Rest API.
anonymous
anonymous / overpass.geojson
Created January 25, 2015 12:38
data exported by overpass turbo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
anonymous
anonymous / Parser_TripleSlash.patch
Created November 13, 2011 16:32
Patch for the PEAR DocTest Parser to support a shorthand syntax
*** Default.php 2011-10-25 18:16:52.499473219 +0200
--- TripleSlashParser.php 2011-10-25 19:28:02.027472030 +0200
***************
*** 86,91 ****
--- 86,96 ----
const KW_DOCTEST_EXPECTS = 'expects';
/**
+ * Short keyword for the doctest expected result
+ */
@mattheworiordan
mattheworiordan / capybara_webkit_screenshot_env.rb
Created August 19, 2011 12:26
Cucumber and Capybara-Webkit automatic screenshots on failure
def screen_shot_and_save_page
require 'capybara/util/save_and_open_page'
path = "/#{Time.now.strftime('%Y-%m-%d-%H-%M-%S')}"
Capybara.save_page body, "#{path}.html"
page.driver.render Rails.root.join "#{Capybara.save_and_open_page_path}" "#{path}.png"
end
begin
After do |scenario|
screen_shot_and_save_page if scenario.failed?