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 / README.md
Created June 24, 2016 02:48
Filtering the Grid 2
@rlugojr
rlugojr / README.md
Created June 24, 2016 02:48
Filtering the Grid
@rlugojr
rlugojr / README.md
Created June 24, 2016 02:48
Sorting the Grid