Created by Christopher Manning
Nodes are linked to nodes in neighboring cells. The cell's color is a function of its area.
The white lines are the Delaunay triangulation and the purple cells are the Voronoi diagram.
| # Amount should be a decimal between 0 and 1. Lower means darker | |
| def darken_color(hex_color, amount=0.4) | |
| hex_color = hex_color.gsub('#','') | |
| rgb = hex_color.scan(/../).map {|color| color.hex} | |
| rgb[0] = (rgb[0].to_i * amount).round | |
| rgb[1] = (rgb[1].to_i * amount).round | |
| rgb[2] = (rgb[2].to_i * amount).round | |
| "#%02x%02x%02x" % rgb | |
| end | |
| $ -> | |
| Event = Backbone.Model.extend() | |
| Events = Backbone.Collection.extend({ | |
| Model: Event, | |
| url : 'events' | |
| }) | |
| EventsView = Backbone.View.extend({ | |
| initialize: -> |
Created by Christopher Manning
Nodes are linked to nodes in neighboring cells. The cell's color is a function of its area.
The white lines are the Delaunay triangulation and the purple cells are the Voronoi diagram.
| readme.md | |
| rendered.html | |
| remain.txt |
| App.module("FooModule.Bar", { | |
| startWithApp: false, | |
| define: function() { | |
| // Code of submodule | |
| } | |
| }); |
| def resize_nocrop_noscale(image, w,h) | |
| w_original = image[:width].to_f | |
| h_original = image[:height].to_f | |
| if w_original < w && h_original < h | |
| return image | |
| end | |
| # resize | |
| image.resize("#{w}x#{h}") |
| require 'pry' | |
| data = { | |
| a: { | |
| alfa: "alfa", | |
| beta: "beta" | |
| }, | |
| b: 2, | |
| c: { | |
| alfa: { |
#Introduction
Developing Chrome Extensions is REALLY fun if you are a Front End engineer. If you, however, struggle with visualizing the architecture of an application, then developing a Chrome Extension is going to bite your butt multiple times due the amount of excessive components the extension works with. Here are some pointers in how to start, what problems I encounter and how to avoid them.
Note: I'm not covering chrome package apps, which although similar, work in a different way. I also won't cover the page options api neither the new brand event pages. What I explain covers most basic chrome applications and should be enough to get you started.
| const express = require("express"); | |
| const router = express.Router(); | |
| router.get('/', function (req, res) { | |
| res.send("This is the '/' route in ep_app"); | |
| }); | |
| module.exports = router; |
| #include <stdint.h> | |
| // GPIO pins used for connected gamepad | |
| #define CLOCK 21 | |
| #define LATCH 20 | |
| #define DATA 19 | |
| #define DEVICE_TYPE_AUTO 0 | |
| #define DEVICE_TYPE_NES 1 | |
| #define DEVICE_TYPE_SNES 2 |