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 * as Rx from 'rxjs/Rx'; | |
import { API_ROOT } from 'src/constants'; | |
import Axios, { AxiosResponse } from 'axios'; | |
import * as moment from 'moment'; | |
function createDatestamp() { | |
return moment().utc().format('YYYY-MM-DDTHH:mm:ss'); | |
} | |
let datestamp = createDatestamp(); |
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 | |
find $1 -type f -print0 | xargs -0 stat -f'%z' | awk '{b+=$1} END {print b}' | awk '{ sum=$1 ; hum[1024**3]="GB";hum[1024**2]="MB";hum[1024]="KB"; for (x=1024**3; x>=1024; x/=1024){ if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x];break } }}' |
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
/** | |
* Bead Ornaments - HackerRank Spring 2013 Hackathon | |
* Java bitmask DP solution | |
* Author: Jerry Ma (2013) | |
* | |
* Note that this solution uses BigInteger, which in some cases can add an unacceptable amount of overhead. | |
* This solution uses recursion with memoization to store the results for previously calculated states. | |
*/ | |
import java.math.*; |