Skip to content

Instantly share code, notes, and snippets.

@tkroll
tkroll / utils.go
Last active February 14, 2022 03:58
Version of https://github.com/ava-labs/avalanche-network-runner/blob/main/local/utils.go using sequential ports starting at 9650.
package local
import (
"context"
"fmt"
"net"
"time"
)
var port uint16 = 9650 - 1
@tkroll
tkroll / gist:53fa3e9151d9232e7399e313b503dc97
Last active June 20, 2017 11:43
Remove errant Phalcon properties in Mongo. Run in the Mongo shell. RE: https://github.com/phalcon/incubator/issues/760
db.getCollectionNames().forEach(function(col) {
db[col].update(
{},
{
$unset: {
"_dependencyInjector":1,
"_modelsManager":1,
"_source":1,
"_operationMade":1,