Skip to content

Instantly share code, notes, and snippets.

View nhooyr's full-sized avatar

Anmol Sethi nhooyr

View GitHub Profile
hosts: [
"aubble.com",
"www.aubble.com",
]
email: "[email protected]"
protos: {
h2: {
fallback: "localhost:8080"
This shows a profile called default. The file default itself is actually a symlink that points to the current generation. When we do a nix-env operation, a new user environment and generation link are created based on the current one, and finally the default symlink is made to point at the new generation. This last step is atomic on Unix, which explains how we can do atomic upgrades.
cat > /etc/NIXOS_LUSTRATE << EOF
etc/nixos
etc/resolv.conf
root/.nix-defexpr/channels
EOF
@nhooyr
nhooyr / main.js
Created September 13, 2016 01:25
$.ajax({
url: 'http://announcement.vassy.net/api/AnnouncementAPI/GetByPage/' + nextPage,
type: 'get',
dataType: 'json',
success: function(data, status) {
$('#search').hide();
$('#search').empty();
$(".spinner").fadeOut("slow");
$('#loadingBot').fadeOut("fast");
// Single line Comment
/*
Multiline Comment
*/
stringArray = [
"foo",
"bar",
]
hosts:
- "aubble.com"
- "www.aubble.com"
email: "[email protected]"
protos:
h2:
fallback: "localhost:8080"
hosts:
avondieselemission.com: "localhost:8083"
www.avondieselemission.com: "localhost:8083"
hosts = [
"aubble.com",
"www.aubble.com",
]
email = "[email protected]"
protos {
h2 {
fallback = "localhost:8080"
One, Python's syntax-relevant indentation breaks the source code change <-> semantic change isomorphism. The most blatant example is pass - in a language with explicit block end delimiters (curly-braced languages' }, Ruby's end, etc.), removing a statement from a block amounts to removing one line from the source file; the semantic operation of one statement removal appears in source control diffs as one line removal. The same goes for Python, except when you're removing the last line from a block: then, the semantic operation of one statement removal is reflected as one line modification (or, as the case may be, a removal plus an addition). And then when you merge things, you may end up with two removals (which is correct) plus two additions (which is not).
One, Python's syntax-relevant indentation breaks the source code change <-> semantic change isomorphism. The most blatant example is pass - in a language with explicit block end delimiters (curly-braced languages' }, Ruby's end, etc.), removing a statement from a block amounts to removing one line from the source file; the semantic operation of one statement removal appears in source control diffs as one line removal. The same goes for Python, except when you're removing the last line from a block: then, the semantic operation of one statement removal is reflected as one line modification (or, as the case may be, a removal plus an addition). And then when you merge things, you may end up with two removals (which is correct) plus two additions (which is not).
array1 = [
1,
2,
]
array2 = [
1
2
]