Skip to content

Instantly share code, notes, and snippets.

View amanriquez's full-sized avatar

Arnulfo Manriquez amanriquez

  • TurboSquid
  • New Orleans
View GitHub Profile

Keybase proof

I hereby claim:

  • I am amanriquez on github.
  • I am amanriquez (https://keybase.io/amanriquez) on keybase.
  • I have a public key ASBa9JGuyGucI0Bcbv4gP_qq6z3mJyXp54XbMZtrR1Oa4go

To claim this, I am signing this object:

@amanriquez
amanriquez / Iterative
Created March 11, 2019 01:48 — forked from JamesEarle/Iterative
Iterative vs. Recursive Tower of Hanoi
import java.util.Stack;
/* An iterative approach to the Tower of Hanoi puzzle. Uses
* 3 stacks as a representation to replace the recursive method
* and approaches all possible legal moves between every peg
* combination at any point in the puzzle.
*
* @author James Earle
*/
@amanriquez
amanriquez / US Zip Codes from 2013 Government Data
Last active February 17, 2019 05:41 — forked from erichurst/US Zip Codes from 2013 Government Data
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
00622,17.991245, -67.153993
@amanriquez
amanriquez / gist:44704043bcddadaa1a43a1c99127dcec
Created December 3, 2018 06:47 — forked from lsauer/gist:2757250
JavaScript : within a string, count the number of occurances of a character / character counting and string-position
//www.lsauer.com 2012
//Answer to:
//http://stackoverflow.com/questions/881085/count-the-number-of-occurances-of-a-character-in-a-string-in-javascript/10671743#10671743
//There are at least four ways. The best option, which should also be the fastest -owing to the native RegEx engine -, is placed at the top. //jsperf.com is currently down, otherwise I would provide you with performance statistics.
#1.
("this is foo bar".match(/o/g)||[]).length
//>2
#2.
"this is foo bar".split("o").length-1

Keybase proof

I hereby claim:

  • I am chango88 on github.
  • I am arnulfom (https://keybase.io/arnulfom) on keybase.
  • I have a public key ASCKTTQ20LyXyxkVIEK9avRd4f4G5kqcNjxnzcItqVE-Zgo

To claim this, I am signing this object: