-
Idealized commit logs - the best talk IMO. Andrew Shreve shows his approach to better understanding of programs by using technique called program slicing - the idea is to decompose program and its tests in way that every 'commit' contains the smallest part of the code that makes included test pass. This way you get a history of program, which aims at incremental development of understanding. Awesome stuff. https://www.youtube.com/watch?v=dSqLt8BgbRQ&index=4&list=PLcGKfGEEONaDvuLDFFKRfzbsaBuVVXdYa
-
Clojure spec - the technique that is built into the language, allowing you to express the constraints over values as a part of function signature definition. Having those, you are able to validate, auto-document and auto-test (genertively) code. While its not a super innovative idea - it's interesting to see something like this to be implemented as a part of the language (i
Craft Conference writeup:
- Wonderful keynote by Dan North about being aware of uncertainity: https://vimeo.com/43603453
- It was pretty unfortunate, but Kyle Kingsbury couldn't make it to the conference, but he managed to record a video for Jepsen V: https://www.youtube.com/watch?v=IcsocrEz9wE&feature=youtu.be (didn't manage to see it yet)
- Adam Tornhill showing outcomes of his static code analysis over large codebases https://www.youtube.com/watch?v=TfZmuS01CNs . Though I've already seen this presentation, I again started to wonder what would have happened if we would apply it on our codebase. I do disagree with him in terms of copy and paste though (its not that straightforward in terms of microservices)
- http://beta.craft-conf.com/speaker/RachelDavies Rachel has proven to me that XP is still up there in some companies, but some of its practices I still consider unfounded - still there was a nice term of emerge of "Full Spectrum Developer" - person that is not only doing development, but also tak
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
<template name="log" value="private static final org.slf4j.Logger LOGGER = org.slf4j.LoggerFactory.getLogger($CLASS_NAME$.class);" description="Creates slf4j logger" toReformat="false" toShortenFQNames="true"> | |
<variable name="CLASS_NAME" expression="className()" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="JAVA_DECLARATION" value="true" /> | |
</context> | |
</template> |
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
aws iam list-users | jq '.Users[].UserName' | xargs -n1 -J % aws iam list-access-keys --user-name % | jq '.AccessKeyMetadata[].AccessKeyId + ":" + .AccessKeyMetadata[].UserName' |
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
#!/bin/bash | |
curl -u $GITHUB_USER:$GITHUB_TOKEN https://$GITHUB_HOST/api/v3/users/$GITHUB_ORG/repos?per_page=1000 | json -a 'ssh_url' |
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
public static class MapMatcher<K, V> extends TypeSafeMatcher<Map<K, V>> { | |
private final Map<K, V> desiredContents = new HashMap<>(); | |
@Override | |
protected boolean matchesSafely(final Map<K, V> item) { | |
for(final Map.Entry<K, V> kvEntry : this.desiredContents.entrySet()) { | |
if (!kvEntry.getValue().equals(item.get(kvEntry.getKey()))) { | |
return false; | |
} |
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
var http = require('http'); | |
module['exports'] = function echoHttp (hook) { | |
hook.debug("Debug messages are sent to the debug console"); | |
hook.debug(hook.params); |
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 urllib2 | |
import urllib | |
import sys | |
import os | |
import json | |
import datetime | |
from pytz import timezone | |
FROM_FORMAT = "%Y-%m-%dT%H:%M:%SZ" | |
TO_FORMAT = "%Y-%m-%d %H:%M" |
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
module Main where | |
primes = 1:(nextPrime 2 []) | |
divisibleByAny x numbers = any (\n -> (rem x n) == 0) numbers | |
nextPrime start primesSoFar = let | |
nextP = head (dropWhile (\x -> divisibleByAny x primesSoFar) [start..]) | |
in | |
nextP:(nextPrime (nextP + 1) (nextP:primesSoFar)) |
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 X: | |
def __enter__(self): | |
print "entering" | |
def __exit__(self, exception_type, exception_val, trace): | |
print "exiting" | |
def restart(): | |
return X() |