Skip to content

Instantly share code, notes, and snippets.

View rlugojr's full-sized avatar

Ray Lugo, Jr. rlugojr

View GitHub Profile
@rlugojr
rlugojr / d3-force.js
Created July 20, 2016 04:56 — forked from emeeks/d3-force.js
BBox Word Cloud
// https://d3js.org/d3-force/ Version 1.0.0. Copyright 2016 Mike Bostock.
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-quadtree'), require('d3-collection'), require('d3-dispatch'), require('d3-timer')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-quadtree', 'd3-collection', 'd3-dispatch', 'd3-timer'], factory) :
(factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3,global.d3));
}(this, function (exports,d3Quadtree,d3Collection,d3Dispatch,d3Timer) { 'use strict';
function center(x, y) {
var nodes;

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
#Python File Hashing
import hashlib
import __future__
#Return available hashing algorithms
print(hashlib.algorithms_available())
#using MD5 method for hashing a file
BLOCKSIZE = 65536
@rlugojr
rlugojr / README.md
Created July 12, 2016 06:06 — forked from eesur/README.md
d3 | simple square grid

Simple square grid that is made of squares (well rect)

Change the height, width and square vars to alter. It simply loops over number of columns and creates a row for each loop iteration.


Note: If you don't want to use lodash

  1. change _.round to Math.round
@rlugojr
rlugojr / index.html
Created July 12, 2016 06:05 — forked from umcrcooke/index.html
Heatmap
<!DOCTYPE html>
<meta charset="utf-8">
<head>
</head>
<style>
.q0-11 {fill: rgb(215, 48, 39);}
.q1-11 {fill: rgb(244, 109, 67);}
.q2-11 {fill: rgb(253, 174, 97);}
.q3-11 {fill: rgb(254, 224, 144);}
@rlugojr
rlugojr / .block
Created July 12, 2016 06:04 — forked from mbostock/.block
Square Grid
license: gpl-3.0
@rlugojr
rlugojr / data.csv
Created July 12, 2016 02:22 — forked from XavierGimenez/data.csv
Waffle Chart
age population
<10 2704659
10-20 4499890
21-30 2159981
31-40 3853788
41-50 14106543
51-60 8819342
61-70 612463
71-80 144320
81-90 3730220
package org.smartjava.dw
import java.io.{File, FileInputStream}
import com.github.mtailor.srtdissector.SrtDissector
import scala.annotation.tailrec
import scala.collection.immutable.ListMap
import scala.io.Source
import scala.util.{Failure, Success}
@rlugojr
rlugojr / google_twunter_lol
Created July 8, 2016 17:50 — forked from ryanlewis/google_twunter_lol
Naughty word list, compiled by Google and @jamiew
4r5e
5h1t
5hit
a55
anal
anus
ar5e
arrse
arse
ass
/**
* Print Stylesheet fuer Deinewebsite.de
* @version 1.0
* @lastmodified 16.06.2016
*/
@media print {
/* Inhaltsbreite setzen, Floats und Margins aufheben */
/* Achtung: Die Klassen und IDs variieren von Theme zu Theme. Hier also eigene Klassen setzen */