Skip to content

Instantly share code, notes, and snippets.

View rlugojr's full-sized avatar

Ray Lugo, Jr. rlugojr

View GitHub Profile
@rlugojr
rlugojr / MemeMaker.html
Created December 30, 2015 20:07 — forked from jwill/MemeMaker.html
Starter code for Meme Maker
<!DOCTYPE html>
<html>
<head>
<title>MemeMaker-Simple</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<style>
@rlugojr
rlugojr / .gitignore
Created January 9, 2016 06:03 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@rlugojr
rlugojr / gulpfile.js
Created January 26, 2016 23:50
Gulpfile
// TODO: Optimize images with responsiveness.
// TODO: Optimize audio and video.
// TODO: Inline critical css.
/* gulpfile.js
*
* This is Tempurturtul's gulpfile. It makes a few assumptions about folder
* structure and requires some markup on html files. Currently handles
* automation of front-end tasks only.
*
@rlugojr
rlugojr / what-forces-layout.md
Created February 4, 2016 02:59 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@rlugojr
rlugojr / gist:5d1dfb2e58c228cdf9bb
Created February 15, 2016 01:09 — forked from chrishamant/gist:1168189
A* pathfinding
/**
* A* (A-Star) Pathfinding Algorithm in JavaScript
* @author Matthew Trost
* @license Creative Commons Attribution-ShareAlike 3.0 Unported License
* @datepublished December 2010
*/
function astar (map, heuristic, cutCorners) {
var listOpen = [];
var listClosed = [];
@rlugojr
rlugojr / nbmerge.py
Created May 31, 2016 01:48 — forked from fperez/nbmerge.py
Merge/concatenate multiple IPython notebooks into one.
#!/usr/bin/env python
# Note, updated version of
# https://github.com/ipython/ipython-in-depth/blob/master/tools/nbmerge.py
"""
usage:
python nbmerge.py A.ipynb B.ipynb C.ipynb > merged.ipynb
"""
import io
@rlugojr
rlugojr / useful_pandas_snippets.py
Created June 10, 2016 04:08 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets
#List unique values in a DataFrame column
pd.unique(df.column_name.ravel())
#Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
#Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(value_list)]
@rlugojr
rlugojr / .block
Created June 26, 2016 06:05 — forked from mbostock/.block
Superformula Explorer
license: gpl-3.0
@rlugojr
rlugojr / index.html
Created June 26, 2016 06:09 — forked from bunkat/index.html
Swimlane Chart using d3.js
<!--
The MIT License (MIT)
Copyright (c) 2013 bill@bunkat.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@rlugojr
rlugojr / index.html
Created June 26, 2016 06:11 — forked from diethardsteiner/index.html
Simple D3JS Dashboard
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Testing Pie Chart</title>
<!--<script type="text/javascript" src="d3/d3.v2.js"></script>-->
<script src="http://d3js.org/d3.v2.js"></script>
<!-- Note: I made good use of the sample code provided by the D3JS community and extended it to fit my needs to create this simple dashboard -->
<style type="text/css">