Skip to content

Instantly share code, notes, and snippets.

View buritica's full-sized avatar
💭
💀

Juan Pablo Buriticá buritica

💭
💀
View GitHub Profile
@buritica
buritica / orientation.js
Created June 4, 2014 20:57
Celtra orientation detection for Onswipe
function getDocDimensions() {
var D = window.parent.parent.document;
return [
D.documentElement.clientWidth,
D.documentElement.clientHeight
];
}
function getOrientation() {
var dimensions = getDocDimensions();
@buritica
buritica / auto-swipe.js
Last active August 29, 2015 14:02
Automate reader swiping
var timer;
var times = 0;
var delay = 4; // seconds
var totalSwipes = 3; //
var next = function() {
if (window.onswipePub) {
onswipePub.entryView.entryMgr.swipeNext();
} else {
leaf.app.router.next();
@buritica
buritica / StartEthernet.ino
Created June 2, 2014 04:18
Enable Galileo Ethernet
#include <SPI.h>
#include <Ethernet.h>
// the media access control (ethernet hardware) address for the Galileo:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
//the IP address for the Galileo:
byte ip[] = { 192, 168, 1, 84 };
void setup()
{
@buritica
buritica / joystiq.html
Last active August 29, 2015 14:01
joystiq example with macros
<script src="http://mads.at.atwola.com/adcall?mpid=348-14-14-823;rettype=js;width=320;height=50;kvpg=joysiq.com;kvmn=348-14-14-823;kvgrp=%%CACHEBUSTER%%;kvismob=1;extmirroring=0;aduho=0;kvmflash=false;swh=%%PATTERN:device_height%%x%%PATTERN:device_width%%;screenwidth=%%PATTERN:device_width%%;screenheight=%%PATTERN:device_height%%;screendensity=%%PATTERN:device_pixel_ratio%%;f=1;fv=0;random=%%CACHEBUSTER%%"></script>
@buritica
buritica / glossy.html
Last active August 29, 2015 14:01
Glossy JSON Spec
<script>
var namespace = 'onswipe';
var message = JSON.stringify({
view_url: '%%VIEW_URL_UNESC%%',
click_url: '%%CLICK_URL_UNESC%%%%DEST_URL%%',
cachebuster: '%%CACHEBUSTER%%',
glossy_id: 'my_id',
type: 'glossy',
pixels: []
});
@buritica
buritica / collections.json
Created April 27, 2014 00:30
Ember Example
{
"collection": [
{
"_id": 1,
"title": "Spring 2014",
"active": true,
"code": "SP14",
"image": "http://ec.dev/collection.jpg",
"products": [
{
@buritica
buritica / pr.md
Last active August 29, 2015 13:57
PR Template

What's this PR do?

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide?

What are the relevant tickets?

Screenshots (if appropriate)

Questions:

  • Does the knowledge base need an update?

Dependencies

Keybase proof

I hereby claim:

  • I am buritica on github.
  • I am buritica (https://keybase.io/buritica) on keybase.
  • I have a public key whose fingerprint is 393D 342F B95C 8BAF 024F EF9F 0592 7A5E ADBA BEF5

To claim this, I am signing this object:

@buritica
buritica / response.js
Last active August 29, 2015 13:57
ios-driver response arguments to waitForElementByCss
{ '0': null,
'1':
{ message: 'bug.null\nBuild info: version: \'unknown\', revision: \'unknown\', time: \'unknown\'\nSystem info: os.name: \'Mac OS X\', os.arch: \'x86_64\', os.version: \'10.9.2\', java.version: \'1.7.0_21\'\nDriver info: driver.version: unknown',
screen: null,
cause:
{ screen: null,
class: 'java.lang.NullPointerException',
stackTrace: [Object] },
class: 'org.openqa.selenium.WebDriverException',
stackTrace:
@buritica
buritica / currentScenarioOrBackground.js
Created February 16, 2014 20:32
Type error thrown when trying to run cucumber.js with examples
{ payloadType: 'scenario',
setBackground: [Function: setBackground],
buildScenarios: [Function: buildScenarios],
getKeyword: [Function: getKeyword],
getName: [Function: getName],
getDescription: [Function: getDescription],
getUri: [Function: getUri],
getLine: [Function: getLine],
getBackground: [Function: getBackground],
addStep: [Function: addStep],