Skip to content

Instantly share code, notes, and snippets.

p1nox /
Last active November 29, 2023 04:38
PostgreSQL configuration without password on Ubuntu for Rails


You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.

Install Postgre packages

  • postgresql
  • postgresql-client
  • libpq-dev
View regex-weburl.js
// Regular Expression for URL validation
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
// Copyright (c) 2010-2018 Diego Perini (
mbostock / .block
Last active October 29, 2023 04:15
The Gist to Clone All Gists
View .block
license: gpl-3.0
jinroh /
Last active October 21, 2023 10:51
Fourier series visualisation with d3.js.

From Wikipedia:

In mathematics, a Fourier series decomposes periodic functions or periodic signals into the sum of a (possibly infinite) set of simple oscillating functions, namely sines and cosines (or complex exponentials).

Use the bottom right form to change the visualized serie.

debasishg / gist:8172796
Last active September 29, 2023 15:20
A collection of links for streaming algorithms and data structures
View gist:8172796

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](
emeeks /
Last active August 22, 2023 16:27 — forked from mbostock/.block
An online tool for interactive teaching of network visualization and representation principles.

The range sliders at the top change the values for the force-directed algorithm and the buttons load new graphs and apply various techniques. This will hopefully serve as a tool for teaching network analysis and visualization principles during my Gephi courses and general Networks in the Humanities presentations.

Notice this includes a pretty straightforward way to load CSV node and edge lists as exported from Gephi.

It also includes a pathfinding algorithm built for the standard data structure of force-directed networks in D3. This requires the addition of .id attributes for the nodes, however.

Now with Clustering Coefficients!

Also, it loads images for nodes but the images are not in the gist. The code also refers to different network types but the data files on Gist only refer to the transportation network.

mbostock /
Last active June 7, 2023 18:33
Underscore’s Equivalents in D3



Underscore example:

_.each([1, 2, 3], function(num) { alert(num); });
johan / octocat.svg
Created June 4, 2011 11:16
Github octocat avatar, SVG format
View octocat.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
sstephenson / gist:1120938
Created August 2, 2011 19:08
Quick guide to installing rbenv
View gist:1120938
# Clone rbenv into ~/.rbenv
git clone ~/.rbenv
# Add rbenv to your PATH
# NOTE: rbenv is *NOT* compatible with rvm, so you'll need to
# remove rvm from your profile if it's present. (This is because
# rvm overrides the `gem` command.)
echo 'export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"' >> ~/.bash_profile
exec $SHELL
ashleybot / D3HTMLtable.js
Created February 21, 2012 05:22
Using D3.js to present XML as HTML Table
View D3HTMLtable.js
d3.xml("/data/GoldenGate2012Results.xml", function(xml) {
var runners ="runner")[0];
var table ="#presentation").append("table").attr("class","grid");
var thead = table.append("thead");