Skip to content

Instantly share code, notes, and snippets.

Máximo Mussini ElMassimo

Block or report user

Report or block ElMassimo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
teeberg /
Last active Oct 4, 2019
CircleCI cancel redundant builds within workflows
import json
import logging
import os
import sys
from os.path import dirname, join
from time import sleep
sys.path.insert(0, join(dirname(__file__), '.env'))
import arrow
ernsheong /
Last active Feb 11, 2020
Accessing macOS localhost from Parallels Desktop IE or Edge

Access macOS localhost from IE or Edge within Parallels Desktop

This issue is so infuriating that I'm going to take some time to write about it.

  1. MOST IMPORTANT. Your local development server must be bound to IP address Some do this by default, but many don't. You need to make sure that you run your local server with correct IP bindings. You may need to provide additional flags to your serve commands e.g. polymer serve --hostname domain.local, hugo serve --bind If you use a named domain like domain.local, it has to be defined in /etc/hosts and pointing at

  2. My Parallels setting is using Shared Network, nothing special there.

  3. Open macOS Terminal and type ifconfig. Look for the value under vnic0 > inet. It is typically

brianhempel / enumerator_to_json.rb
Created Feb 17, 2015
Lazily convert an Enumerator or Enumerator::Lazy to a JSON array. Save as config/initializers/enumerator_to_json.rb
View enumerator_to_json.rb
# Natively, Enumerators get JSONized like "#<Enumerator::Lazy:0x007f8714807080>", or they explode, either of which is a problem.
# We want them to make an array, and do it lazily so we don't have to keep the items in memory!
class Enumerator
def to_json(state)
state.depth += 1
string = "[\n"
first_item = true
self.each do |item|
You can’t perform that action at this time.