Skip to content

Instantly share code, notes, and snippets.

@crispamares
crispamares / Scatterplot 200K points
Created February 8, 2022 18:18
Render 200K scatterplot with vega
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "A basic scatter plot example depicting automobile statistics.",
"width": 800,
"height": 600,
"padding": 5,
"data": [
{
"name": "source",
@crispamares
crispamares / .block
Created May 25, 2017 23:55 — forked from mbostock/.block
Adjustable Link Strength
license: gpl-3.0
height: 600
@crispamares
crispamares / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@crispamares
crispamares / README.md
Last active August 29, 2015 14:06
Backups tremendos en la nube

Hace no mucho me preguntaron si sabía de alguna manera barata de tener backups de muchos ficheros bastante pesados, como por ejemplo muchas fotos y vídeos. En total estaríamos hablando de en torno a 4 TB de información generada al año.

Backup Offline

Una solución podría ser hacer los backups "offline". Sin subirlos a ningún servicio. Se conecta al ordenador se hace la copia, se "extrae con seguridad" y se guarda a buen recaudo. Esta opción tiene muchas ventajas:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Plantilla</title>
</head>
<body>
</body>
</html>
@crispamares
crispamares / celery.conf
Last active December 18, 2015 02:48
Upstart configuration. Starts celeryd when mongodb is running. Tested in Ubuntu 12.04 Contains /etc/init/celery.conf and /etc/default/celeryd
start on started mongodb
stop on stopping mongodb
# limit the retries to max 15 times with timeouts of 5 seconds
respawn limit 15 5
# Time to wait between sending TERM and KILL signals
kill timeout 20
script
@crispamares
crispamares / comparator.js
Created April 19, 2012 09:06
Example of the comparometer
/**
* https://docs.google.com/spreadsheet/ccc?key=0AgLTtFH_1iwUdFNHeFVzRVZSS2Y2R0ZHeDByTjBXNXc
*/
function compare(amount, el, google_key) {
console.log("*** Compare", amount);
/**
* Those references should be gotten from the backend
*/
var references = [{count: 18,