Skip to content

Instantly share code, notes, and snippets.

Lautaro Orazi tarolandia

Block or report user

Report or block tarolandia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tarolandia
tarolandia / placeholder-color.sass
Created Apr 22, 2013
Sass: mixin that let you change placeholder font color.
View placeholder-color.sass
@mixin placeholder-color($color) {
&::-webkit-input-placeholder { /* WebKit browsers */
color: $color;
}
&:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: $color;
}
&::-moz-placeholder { /* Mozilla Firefox 19+ */
color: $color;
}
View new_wi_list.md

List File Wire Instructions

This endpoint retrieves wire instructions related to a File

Endpoint

GET /ncs/v1/files/:id/wire-instructions

Path Parameters

@tarolandia
tarolandia / steps
Created May 5, 2013
Disable sync flag when mounting an External HDD to your raspberry pi (xBian)
View steps
sudo vi /etc/usbnount/usbmount.conf
...
MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime,rw"
...
remove sync flag and save the file
...
View keybase.md

Keybase proof

I hereby claim:

  • I am tarolandia on github.
  • I am tarolandia (https://keybase.io/tarolandia) on keybase.
  • I have a public key ASBpqdKkdSTEfo9piqsd2JGGnUaxRa36s743UM7hyUcV7Qo

To claim this, I am signing this object:

@tarolandia
tarolandia / geocoder.js
Last active Dec 29, 2015
Mock maps API or at least part of it
View geocoder.js
(function() {
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
(function() {
window.google = {};
window.google.maps = {};
window.google.maps.GeocoderStatus = {};
window.google.maps.GeocoderStatus.OK = "OK";
window.google.maps.MapTypeId = {};
window.google.maps.MapTypeId.ROADMAP = "roadmap";
window.google.maps.Map = function(id,options) { return true; };
View places_controller.rb
m = Address.new({
title: params[:title],
address_full_address: params[:address_full_address],
address_lat: '%.12g' % params[:address_lat].to_f,
address_lng: '%.12g' % params[:address_lng].to_f,
address_country_code: params[:address_country_code],
address_state: params[:address_state],
address_city: params[:address_city],
address_street_address: params[:address_street_address],
})
View iframe.md

The link Public Status Pages programmatically opens an external resource into mHealth layout. There are several problems with this behavior:

  • It opens an external resource inside mHealth. This means a different design and layout that does not fit 100% with mHealth design.
  • A priori It is not possible to know the height and width of the external resource.
  • When navigating the external resource there might be changes related to the content that do not fit in the container.
  • Lack of control over the external resource

In order to handle this unpredictable behavior the HTML tag iframe (where the external content is loaded) supports scrollbars but they tend to look ugly in most of designs.

Another possible and recommended option is to open the resource into a new tab or windows.

View old_vs_new_rial_client
[taro@tarolandia mhealth]$ PROTEST_REPORT=progress be rake test (861-upgrade_riak_client ✔)
............................................................................................................................................................................
172 tests, 391 assertions (172 passed, 0 pending, 0 failed, 0 errored)
Ran in 157.633680122 seconds
Coverage report generated for Protest to /home/taro/development/mhealth/coverage. 2948 / 5632 LOC (52.34%) covered.
[taro@tarolandia mhealth]$ PROTEST_REPORT=progress be rake test (861-upgrade_riak_client ✔)
............................................................................................................................................................................
172 tests, 391 assertions (172 passed, 0 pending, 0 failed, 0 errored)
View geo.json
{
"status": "OK",
"accuracy": 10.0,
"location": {
"lat": 48.777,
"lng": 9.171,
"latitude": 48.777,
"longitude": 9.171,
"accuracy": 10.0
}
View gist:7135030
[taro@tarolandia lib]$ php -a (master ✗)
Interactive shell
php > include "m2x.php";
php > $m2x = new M2X("b90db94f6ef123c3a291156b7a55e516");
php > $r = $m2x->feeds()->view("8081a7e630caecfb184bdb5f18bad137");
php > print_r($r->json());
stdClass Object
(
[id] => 8081a7e630caecfb184bdb5f18bad137
You can’t perform that action at this time.