This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NUCLEAR WASTE SOFTWARE LICENSE V1.0 | |
Copyright <YEAR> <OWNER> | |
This software license is a message... and part of a system of messages... | |
pay attention to it! Writing this software and associated documentation | |
files (the "Software") was important to us. We considered ourselves to be a | |
powerful culture. This Software is not a place of honor... no highly | |
esteemed deed is commemorated here... nothing valued is here. What is here was | |
dangerous and repulsive to us. This message is a warning about danger. The |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class E(BaseException): | |
def __new__(cls, *args, **kwargs): | |
return cls | |
def a(): yield | |
a().throw(E) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { FormGroup, FormControl, FormArray, Validators } from "@angular/forms"; | |
function testFormGroupTyped() { | |
var frm = new FormGroup({ | |
a: new FormArray([new FormControl(0)]), | |
b: new FormControl(true), | |
c: new FormGroup({ | |
s: new FormControl("abc"), | |
n: new FormControl(123) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
# Print Map | |
Usage: | |
// option 1 | |
.debug { | |
@include print-map($map); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add the following 'help' target to your Makefile | |
# And add help text after each target name starting with '\#\#' | |
help: ## Show this help. | |
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | |
# Everything below is an example | |
target00: ## This message will show up when typing 'make help' | |
@echo does nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Approach: | |
# 1. Find variable declaration in the form of "$my-var: anyvalue" | |
# 2. Loop through found variables and find occurrences of each variable in all sass files | |
# 3. Filter out vars that occurred only once | |
if [ -z "$1" ]; then | |
echo "Please specify a directory as the first argument." | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.codehaus.jackson.annotate.{ JsonTypeInfo, JsonSubTypes, JsonProperty } | |
import org.codehaus.jackson.annotate.JsonSubTypes.Type | |
import org.codehaus.jackson.map.ObjectMapper | |
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") | |
@JsonSubTypes(Array( | |
new Type(value = classOf[Bingo], name = "x"), | |
new Type(value = classOf[Bongo], name = "y"), | |
new Type(value = classOf[Bungo], name = "z") | |
)) |