Skip to content

Instantly share code, notes, and snippets.

!function() {
var doc = document,
htm = doc.documentElement,
lct = null, // last click target
nearest = function(elm, tag) {
while (elm && elm.nodeName != tag) {
elm = elm.parentNode;
}
return elm;
};
@csasbach
csasbach / tooltip.css
Created March 13, 2011 00:34
Create tooltips on mouseover or on click (for supporting touch interfaces).
abbr
{
border-bottom: 1px dotted #666;
cursor: help;
}
.tooltip
{
position:absolute;
background-color:#eeeefe;
@strzibny
strzibny / unused_routes.rb
Created May 5, 2016 15:21
Find unused routes in Rails
#!/usr/bin/env ruby
# Extracted from traceroute gem + checking the presence of views as well
require_relative './config/environment.rb'
class Traceroute
def initialize(app)
@app = app
end
@rveciana
rveciana / .block
Last active December 26, 2022 12:39
Animated isometric view with D3js
licence: mit
@lorenzopub
lorenzopub / .block
Created June 24, 2017 05:41
Animated isometric view with D3js
licence: mit
@nedgar
nedgar / .block
Last active December 26, 2022 12:50 — forked from rveciana/.block
Animated isometric view with D3js
licence: mit
@maccesch
maccesch / CytoscapeDotLayout.ts
Created November 7, 2018 11:11
cytoscape.js dot layout using viz.js
import Viz from 'viz.js';
import {Module, render} from 'viz.js/full.js.opaque';
function CytoscapeDotLayout(options) {
this.options = options;
}
CytoscapeDotLayout.prototype.run = function () {
let dotStr = 'digraph G {';
@senderle
senderle / hand-modify-pdf.md
Created September 23, 2020 15:03
So you want to modify the text of a PDF by hand

So you want to modify the text of a PDF by hand...

If you, like me, resent every dollar spent on commercial PDF tools, you might want to know how to change the text content of a PDF without having to pay for Adobe Acrobat or another PDF tool. I didn't see an obvious open-source tool that lets you dig into PDF internals, but I did discover a few useful facts about how PDFs are structured that I think may prove useful to others (or myself) in the future. They are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.