Skip to content

Instantly share code, notes, and snippets.

Working from home

David davidtorroija

Working from home
Block or report user

Report or block davidtorroija

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
davidtorroija / bounding_box_fabricjs.js
Created Sep 26, 2016 — forked from coulix/bounding_box_fabricjs.js
Get bounding box off all objects on a fabric canvas
View bounding_box_fabricjs.js
getBoardBoundingBox: function(canvas) {
var minX = Number.MAX_VALUE;
var maxX = Number.MIN_VALUE;
var minY = Number.MAX_VALUE;
var maxY = Number.MIN_VALUE;
var rad = o.angle * Math.PI/180;
var w = o.width * o.scaleX;
View resize canvas
Reveal.prototype.resize = function(canvas) {
var _this, challengeToolsDiv, container, footerHeight, headerHeight, height, init_height, init_ratio, init_width, objects, ratio, ref, resize_height, resize_width, scaleX, scaleY, toolsDiv, toolsHeight, width;
_this = this;
init_width = this.init_width;
init_height = this.init_height;
init_ratio = init_width / init_height;
container = $('#widget-container');
resize_width = false;
resize_height = false;
width = container.find('.main')[0].clientWidth;
View xhtml
<!DOCTYPE html>
<html lang="en" xmlns="" xmlns:epub="">
<meta charset="utf-8" />
<title>videojs-overlay Demo</title>
<link href="" rel="stylesheet" />
View package json example
"name": "",
"version": "1.0.0",
"description": "",
"homepage": "",
"repository": {
"type": "git",
"url": "git+"
"//": [],
View Preferences with material theme
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"enable_tab_scrolling": false,
"find_selected_text": true,
davidtorroija / nightwatch.json
Created Apr 11, 2016
nightwatch json file to start e2e tests from scratch
View nightwatch.json
"src_folders" : ["tests"],
"output_folder" : "./reports",
"custom_commands_path" : ["./node_modules/nightwatch-commands/commands/","./custom-commands/"],
"custom_assertions_path" : "./node_modules/nightwatch-commands/commands/",
"page_objects_path" : "./page-objects/",
"globals_path" : "",
"skip_testcases_on_fail": "false",
"end_session_on_fail": "false",
View Preferences.sublime-settings
"bold_folder_labels": true,
"color_scheme": "Packages/User/SublimeLinter/Capo-Light (SL).tmTheme",
"enable_tab_scrolling": false,
"find_selected_text": true,
"font_size": 16,
"highlight_modified_tabs": true,
davidtorroija / wercker-config-nightwatch-mocha.yml
Created Apr 11, 2016
Wercker CI config file to run in a Node Box: nightwatch with mocha, firefox and a custom nightwatch.json that differs from the dev file, also installs java to run selenium
View wercker-config-nightwatch-mocha.yml
box: node
- script:
name: setup
code: |
sudo apt-get update -y -qq
- install-packages:
packages: ruby ruby-dev bzr mercurial git wget
- script:
You can’t perform that action at this time.