This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title><%= yield :title %></title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
<meta name="HandheldFriendly" content="true" /> | |
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> | |
<!-- FIXME only include Google Maps API when it is actually needed --> | |
<%= render 'application/google_maps_api' %> | |
<%= javascript_include_tag "application", "data-turbolinks-track" => true %> |
This file contains 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
@import 'colors.css.scss'; | |
@import 'functions.css.scss'; | |
@import 'variables.css.scss'; | |
.dashboard-container{ | |
padding-left: $fixed-column-width; | |
box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
margin-top: ($dashboard-header-height+65); |
This file contains 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
@mixin grid-unit($columns, $_grid-columns){ | |
float: left; | |
min-height: 1px; | |
display: block; | |
position: relative; | |
width: percentage(($columns / $_grid-columns)); | |
} | |
@function offset-columns($columns, $_grid-columns) { | |
$margin: percentage(($columns/$_grid-columns)); |
This file contains 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 TimeEntry | |
extend ActiveSupport::Concern | |
included do | |
validates :timestamp, presence: true | |
validates :sensor_id, presence: true | |
validate :timestamp_is_parseable | |
end | |
protected |
This file contains 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
curl -X POST -H "AUTHORIZATION:c106ec2f4a0addd15221d88a852fe60a" \ | |
https://sensors.nourishcare.co.uk/api/v0/time_entries \ | |
-d ' | |
{ | |
"events": [ | |
{ | |
"sensor_id": 1, | |
"values": [ | |
[ |
This file contains 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 'RMagick' | |
require 'rtesseract' | |
class CaptchaBreaker | |
def initialize(image_file) | |
@image = Magick::Image.read(image_file).first | |
@image = @image.quantize(3, Magick::GRAYColorspace) | |
end | |
def break |
This file contains 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 Filterable | |
extend ActiveSupport::Concern | |
included do | |
class_variable_set(:@@filterables, {}) | |
end | |
module ClassMethods | |
# Receives an hash (filtering params) where the key is the name of a scope | |
# and the values are the attributes passed to the scope |
This file contains 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
<% if health_profile.health_profile_medical_conditions.archived(false).any? %> | |
<div class="table-entry"> | |
<h3 class="panel-sub-title"><%= MedicalCondition.tp %></h3> | |
<%= editable_table_for( | |
health_profile.health_profile_medical_conditions.archived(false), | |
[ | |
medical_condition_id: { label: MedicalCondition.tp }, | |
start_on: { class: "text-center" }, | |
finish_on: { class: "text-center" }, | |
observations: {} |
This file contains 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
<% content_for(:title) { @client.name } %> | |
<%= render layout: 'people/header', locals: { person: @client, person_link: client_path(@client, no_from_url: true) } do %> | |
<%= link_to fa_icon('tasks', text: t('client.care_plan')), idp_client_path(@client), class: 'btn btn-default' %> | |
<%= link_to fa_icon('edit', text: t('common.edit')), edit_client_path(@client), class: 'btn btn-default' if can? :edit, @client %> | |
<% end %> | |
<div class="panel-group group-client-info" role="tablist" aria-multiselectable="true"> | |
<div class="panel panel-default"> | |
<div class="panel-heading"> |
This file contains 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
<label for="show-archived" class="btn btn-default" ng-class="{active: categories.showArchived}"> | |
{{ t('common.show_archived') }} | |
<input ng-model="categories.showArchived" id="show-archived" type="checkbox" placeholder="" /> | |
</label> |
OlderNewer