Skip to content

Instantly share code, notes, and snippets.

@i5ar
i5ar / index.html
Created December 25, 2018 07:21 — forked from tmcw/index.html
d3.keybinding
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font:12px/20px 'Helvetica';
}
textarea, input {
width:100%;
height:20px;
margin:0;
@i5ar
i5ar / recover.c
Last active January 28, 2019 04:43 — forked from jcoryalvernaz/recover
Recover card
#include <stdio.h>
#include <stdbool.h>
int main(int argc, char *argv[])
{
// Make sure that I have one command line argument
if (argc != 2)
{
fprintf(stderr, "Usage: ./recover image\n");
@i5ar
i5ar / custom_xkb.desktop
Created July 9, 2018 04:30 — forked from edliaw/custom_xkb.desktop
Custom keyboard layout for GNOME
[Desktop Entry]
Name=Keyboard Layout
Type=Application
Exec=sh -c "sleep 10 && [ -f \\$HOME/.Xkeymap ] && xkbcomp \\$HOME/.Xkeymap \\$DISPLAY 2> /dev/null"
Terminal=false
NoDisplay=true
X-GNOME-Autostart-enabled=true
@i5ar
i5ar / template.html
Created April 15, 2017 23:05 — forked from imkevinxu/template.html
Django code to read uploaded CSV file
<form action="{% url %}" method="post" enctype="multipart/form-data">{% csrf_token %}
<input type="file" name="csv_file" />
<input type="submit" value="Upload" />
</form>
@i5ar
i5ar / data.csv
Created March 4, 2017 18:13 — forked from d3noob/.block
Simple d3.js tooltips
date close
1-May-12 58.13
30-Apr-12 53.98
27-Apr-12 67.00
26-Apr-12 89.70
25-Apr-12 99.00
24-Apr-12 130.28
23-Apr-12 166.70
20-Apr-12 234.98
19-Apr-12 345.44
@i5ar
i5ar / README.md
Created February 26, 2017 02:10 — forked from nitaku/README.md
2.5D interactive building

This example shows a method to create an interactive map of a building. Inspired by the wayfinding design solutions commonly found in airports or shopping centers, this map is in 2.5D.

In particular, this example shows how to load an external SVG file with d3.js, how to lower the walls' opacity via CSS to achieve a see-through effect, and how to make some zones of the map interactive (in this case, the rooms).

The SVG is an Inkscape-edited version of multiple PDF exports from Trimble's Sketchup, an easy to use, freeware 3D graphic software. In order for this method to work, manual editing of the SVG and the adherence to a formal set of IDs, classes and layer names are required, making the solution not trivial to maintain. Despite this, the proposed solution achieves high levels of both aesthetical value and clarity of representation.

@i5ar
i5ar / README.md
Created February 26, 2017 02:07 — forked from christophermanning/README.md
Simple Path Editor
@i5ar
i5ar / LICENSE.md
Created February 25, 2017 18:43 — forked from tommaybe/LICENSE.md
Day / Hour Heatmap

Copyright (c) 2016, Tom May

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTH

@i5ar
i5ar / data.csv
Last active December 9, 2016 01:28 — forked from mbostock/.block
Dispatching Events
id Under 5 5 to 13 14 to 17
AL 310504 552339 259034
AK 52083 85640 42153
AZ 515910 828669 362642