Skip to content

Instantly share code, notes, and snippets.

View eorroe's full-sized avatar

Buddha Rey eorroe

  • @the3dwin
  • Miami, Florida
View GitHub Profile
@marijn
marijn / README.markdown
Last active July 12, 2024 16:18
List of countries in YAML, CSV and TXT format
@mshafrir
mshafrir / states_hash.json
Created May 9, 2012 17:05
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
@domenic
domenic / promises.md
Last active June 24, 2024 03:11
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@KelseyDH
KelseyDH / ruby_rails_windows.md
Last active May 16, 2024 07:48
Ruby on Rails Microsoft Windows Troubleshooting Tips

Ruby on Rails Windows Troubleshooting Tips & Survival Guide

Intro/Overview

The Ruby on Rails Windows Troubleshooting tips & Survival Guide is a random catalogue of issues I faced working with Ruby on Rails on Windows (Windows 7 specifically). This guide is not exhaustive, but covers many of the challenges that causes Windows Ruby developers to jump ship to Linux or Mac. If you're reading this guide then you're probably new to Ruby/Rails, so also included is more general beginner advice to help you get going.

Personal Side Note

Before you follow this guide, I strongly recommend you consider using Linux or Mac OS X for Ruby Development instead. Looking to prove a point as a challenge, I ignored this strongly given advice while learning Ruby/Rails. While I eventually did succeed in getting Ruby on Rails to work in Windows, it was not easy, and I easily lost 40+ hours on StackOverFlow to Windows/Ruby configuration issues--time I could have devoted to learning more about th

@WebReflection
WebReflection / String.prototype.template.js
Last active August 17, 2022 04:04
ES6 Template like strings in ES3 compatible syntax.
// this is now a module:
// https://github.com/WebReflection/backtick-template#es2015-backticks-for-es3-engines--
var template = require('backtick-template');
// just string
const info = 'template';
`some ${info}` === template('some ${info}', {info});
@getify
getify / add.js
Last active September 2, 2020 04:11
an `add(..)` function that keeps going forever :)
function add() {
var sum = 0;
function add() {
for (var i=0; i<arguments.length; i++) {
sum += Number(arguments[i]);
}
return add;
}
add.valueOf = function valueOf(){
@paulirish
paulirish / what-forces-layout.md
Last active July 23, 2024 15:12
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.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@Kyle-Mendes
Kyle-Mendes / String.prototype.format.js
Last active January 12, 2016 22:44
String.prototype.format
String.prototype.format = function() {
var self = this,
formats = self.match(/{(:?\d*)}/g), // an array of formats `{}` found in the string
counter = 0, // A counter to keep track of what index to replace with
args = arguments; // Dereferencing arguments for use in the nested code blocks
if (formats) {
formats.forEach(function(format) { // We loop through each format expression in the array
var namedMatch = format.match(/{:(\d+)}/), // Checking if the format is a named replacement (i.e. {:1})
reg;
@mathiasbynens
mathiasbynens / web-platform-status-links.md
Last active July 4, 2024 22:36
Web platform status links