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
teeberg / circleci_2_0_cancel_redundant_builds.py
Last active Mar 20, 2019
CircleCI cancel redundant builds within workflows
View circleci_2_0_cancel_redundant_builds.py
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
ernsheong / access-mac-localhost-from-parallels-desktop-ie-edge.md
Last active Sep 18, 2019
Accessing macOS localhost from Parallels Desktop IE or Edge
View access-mac-localhost-from-parallels-desktop-ie-edge.md

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 0.0.0.0. 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 0.0.0.0. If you use a named domain like domain.local, it has to be defined in /etc/hosts and pointing at 0.0.0.0.

  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 10.211.55.2.

@brianhempel
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.