Skip to content

Instantly share code, notes, and snippets.

Ian Lollar redhotvengeance

Block or report user

Report or block redhotvengeance

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
View types.markdown

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

Isaddo / import-github-labels.js
Last active Sep 8, 2019
import github labels via console command
View import-github-labels.js
Go on your labels page (
Edit the following label array
Use this snippet to export github labels (
and replace it
Paste this script in your console
Press Enter!!
staltz /
Last active Dec 28, 2018
How to show migration guides in GitHub Markdown

How to show migration guides in GitHub Markdown

Use the diff code highlighting tag.

  - foo
  + bar


MoOx / index.js
Last active Nov 25, 2019
Export/import github labels
View index.js
// go on you labels pages
// eg
// paste this script in your console
// copy the output and now you can import it using !
var labels = [];
.forEach(function(element) {
name: element.textContent.trim(),
tmodrzynski /
Last active Apr 5, 2017
ndb.Model - migrating properties like a boss

ndb.Model - migrating properties like a boss

The problem

Consider following model:

class X(ndb.Model):
    prop1 = ndb.StringProperty()
    prop2 = ndb.StringProperty()
jashkenas /
Last active Nov 17, 2019
Why Semantic Versioning Isn't

Spurred by recent events (, this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.

For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.

But Semantic Versioning (henceforth, SemVer), as specified at, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.

SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil

staltz /
Last active Dec 5, 2019
The introduction to Reactive Programming you've been missing
View Swift Guided Tour Solutions
Swift Programming Language Guide
"A Swift Tour" Solutions
These are the solutions to all the "experiments" in the pre-release Swift Programming Guide
(released on the same day Apple announced Swift). A couple of things worth noting:
1. Swift syntax, e.g. array declarations, has changed since I releasd these. So this code will
probably cause some errors when you paste it into a playground. Should be easy enough to fix
jeremydw / google-app-engine-environment.textile
Last active Apr 8, 2018
Google App Engine Environment Variables (as of Google App Engine/1.8.6, October 2013)
View google-app-engine-environment.textile
CONTENT_TYPE application/x-www-form-urlencoded
CURRENT_VERSION_ID appid.370290628632119235
claystreet /
Last active Jan 3, 2017
Google App Engine (GAE) helper for python.... create dynamic properties of any basic type (except ndb.StructuredProperty). Include as a mixin in any ndb.Expando or ndb.Model derived class. class MyModel(ndb.Model, DynamicPropertyMixin): pass Then... at any point where you have a MyModel entity you can create a dynamic property: my = MyModel() my…
from google.appengine.ext import ndb
class DynamicPropertyMixin(object):
""" Facilitates creating dynamic properties on ndb.Expando entities.
Also works on ndb.Model derived classes!
Note: keyword args are passed on to the underlying ndb.XxxProperty() class
def is_prop(self, name):
You can’t perform that action at this time.