Skip to content

Instantly share code, notes, and snippets.

Avatar

Ray Lugo, Jr. rlugojr

View GitHub Profile
@rlugojr
rlugojr / MemeMaker.html
Created Dec 30, 2015 — forked from jwill/MemeMaker.html
Starter code for Meme Maker
View MemeMaker.html
<!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 Jan 9, 2016 — forked from octocat/.gitignore
Some common .gitignore configurations
View .gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
View gulpfile.js
// 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 Feb 4, 2016 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.
View what-forces-layout.md

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()
View gist:5d1dfb2e58c228cdf9bb
/**
* 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 — forked from fperez/nbmerge.py
Merge/concatenate multiple IPython notebooks into one.
View nbmerge.py
#!/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
View useful_pandas_snippets.py
#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 Jun 26, 2016 — forked from mbostock/.block
Superformula Explorer
View .block
license: gpl-3.0
@rlugojr
rlugojr / index.html
Created Jun 26, 2016 — forked from bunkat/index.html
Swimlane Chart using d3.js
View index.html
<!--
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 Jun 26, 2016 — forked from diethardsteiner/index.html
Simple D3JS Dashboard
View index.html
<!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">