Skip to content

Instantly share code, notes, and snippets.

Avatar

Ray Lugo, Jr. rlugojr

View GitHub Profile
@rlugojr
rlugojr / d3-force.js
Created Jul 20, 2016 — forked from emeeks/d3-force.js
BBox Word Cloud
View d3-force.js
// 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;
View gist:a56cadaf540ccc0d4def117220a00034

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
View Hashlib_Examples.py
#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 Jul 12, 2016 — forked from eesur/README.md
d3 | simple square grid
View README.md

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
View index.html
<!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 Jul 12, 2016 — forked from mbostock/.block
Square Grid
View .block
license: gpl-3.0
@rlugojr
rlugojr / data.csv
Created Jul 12, 2016 — forked from XavierGimenez/data.csv
Waffle Chart
View data.csv
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
View DWCounter.scala
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 Jul 8, 2016 — forked from ryanlewis/google_twunter_lol
Naughty word list, compiled by Google and @jamiew
View google_twunter_lol
4r5e
5h1t
5hit
a55
anal
anus
ar5e
arrse
arse
ass
View print.css
/**
* 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 */