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(date_util). | |
-compile(export_all). | |
epoch() -> | |
now_to_seconds(now()) | |
. | |
epoch_hires() -> | |
now_to_seconds_hires(now()) | |
. |
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/sh | |
docker images --format '{{.Size}}\t{{.Repository}}\t{{.Tag}}\t{{.ID}}' | sed 's/ //' | sort -h -r | column -t |
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 java.lang.String toString() { | |
#if ( $members.size() > 0 ) | |
#set ( $i = 0 ) | |
return "{\"_class\":\"$classname\", " + | |
#foreach( $member in $members ) | |
#set ( $i = $i + 1 ) | |
#if ( $i == $members.size() ) | |
#set ( $postfix = "+" ) | |
#else | |
#set ( $postfix = "+ "", "" + " ) |
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
Promise = require('bluebird') | |
var A = function() { | |
return new Promise(function(resolve, reject) { | |
var result = 'A is done' | |
console.log(result) | |
resolve(result); | |
}) |
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
<html> | |
<head> | |
<title> | |
[Visualizing Movement Data with D3.js] | |
</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js"></script> | |
<script src="mviz.js"></script> | |
<style> | |
* { | |
box-sizing: border-box |
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(poc). | |
-export([all/0,say_hello/1]). | |
-record(person,{name,genre,age}). | |
new_person(Name, Genre, Age) -> | |
#person{name=Name, genre=Genre, age=Age}. | |
isOlderThanAveragePeople(Age,AverageAge)-> | |
Age>=AverageAge. |
NewerOlder