Skip to content

Instantly share code, notes, and snippets.


Ray Lugo, Jr. rlugojr

View GitHub Profile
rlugojr /
Created March 28, 2017 11:54 — forked from sebz/
hugo + gruntjs + lunrjs = <3 search
rlugojr / Pandas and Seaborn.ipynb
Created February 23, 2017 07:40 — forked from 5agado/Pandas and Seaborn.ipynb
Data Manipulation and Visualization with Pandas and Seaborn — A Practical Introduction
View Pandas and Seaborn.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
rlugojr / animate.R
Created February 9, 2017 20:04 — forked from thomasp85/animate.R
Animating graph over time
View animate.R
# Data from
infect <- read.table('out.sociopatterns-infectious', skip = 2, sep = ' ', stringsAsFactors = FALSE)
infect$V3 <- NULL
names(infect) <- c('from', 'to', 'time')
infect$timebins <- as.numeric(cut(infect$time, breaks = 100))
# We want that nice fading effect so we need to add extra data for the trailing
rlugojr / log.R
Created December 29, 2016 23:07 — forked from mollietaylor/log.R
Plot Weekly or Monthly Totals in R
View log.R
# load data:
log <- data.frame(Date = c("2013/05/25","2013/05/28","2013/05/31","2013/06/01","2013/06/02","2013/06/05","2013/06/07"),
Quantity = c(9,1,15,4,5,17,18))
# convert date variable from factor to date format:
View gist:4cc00a8671fb5c7731a9b2a62ef3f515
title: "Codebook template"
author: "Your name here"
date: "The date here"
keep_md: yes
## Project Description
rlugojr /
Created October 21, 2016 15:35 — forked from AvnerCohen/
Node.js - npm Cheat Sheet

Node.js - npm Cheat Sheet

(Full description and list of commands at -

##List of less common (however useful) NPM commands

######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:

rlugojr /
Created October 15, 2016 06:32 — forked from xdamman/
Install latest ffmpeg on ubuntu 12.04 or 14.04
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
rlugojr / index.html
Created August 31, 2016 01:02
Thumbnail with Animated Captions
View index.html
<section id="container">
<div class="thumbnail"
data-description="Bacon ipsum dolor amet filet mignon alcatra short ribs, sausage shoulder tail biltong rump chicken ground round ham hock porchetta tri-tip. Boudin bresaola andouille, leberkas pork ball tip turducken beef ribs">
<img src="" alt="Meat" width="300">
rlugojr /
Created August 22, 2016 08:48 — forked from xem/
Maths & trigonometry cheat sheet for 2D & 3D games


  • A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
  • lengths are in any unit (ex: pixels)
  • code snippets are in JavaScript

Degrees to radians

angleRad = angleDeg * Math.PI / 180;

View regex-weburl.js
// Regular Expression for URL validation
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
// Copyright (c) 2010-2013 Diego Perini (
// Permission is hereby granted, free of charge, to any person