Identify Seattle bus stops that are within 1 hour of the Food Bank on public transportation.
- From where in the city is the Food Bank accessible within 1 hour?
- Where in the city is accessible from the Food Bank within 1 hour?
# Reference | |
# - http://august.nagro.us/optimized-openjdk.html | |
# - https://hg.openjdk.java.net/jdk/jdk/raw-file/tip/doc/building.html#x11 | |
# swupd bundle-add c-basic git openssh-client diffutils file which unzip zip java13-basic | |
# swupd bundle-add devpkg-libX11 devpkg-libXtst devpkg-libXrandr devpkg-libXt devpkg-libXrender | |
# swupd bundle-add dev-utils-dev # :( | |
# git clone git@github.com:openjdk/jdk.git | |
# git checkout jdk13-ga |
Identify Seattle bus stops that are within 1 hour of the Food Bank on public transportation.
public class Permutations { | |
public static <T> Stream<Stream<T>> of(final List<T> items) { | |
return IntStream.range(0, factorial(items.size())).mapToObj(i -> permutation(i, items).stream()); | |
} | |
private static int factorial(final int num) { | |
return IntStream.rangeClosed(2, num).reduce(1, (x, y) -> x * y); | |
} |
var BrowserPrint = function() { | |
function e(e) { | |
return s + e | |
} | |
function n(e, n) { | |
var i = new XMLHttpRequest; | |
return "withCredentials" in i ? i.open(e, n, !0) : "undefined" != typeof XDomainRequest ? (i = new XDomainRequest, i.open(e, n)) : i = null, i | |
} |
# To get file | |
adb pull <PATH/TO/FILE/ON/DEVICE> | |
# To push file | |
adb push <PATH/TO/FILE> <PATH/TO/DESTINATION> | |
# To get wifi MAC address | |
adb shell cat /sys/class/net/wlan0/address | |
# To get IP Address |
#!/usr/bin/env sh | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: adb-record <FILENAME>" | |
exit -1 | |
fi | |
RECORDING_FILE=$1 | |
TEMPDIR=`mktemp -d` | |
adb shell 'rm -rf /sdcard/screenrecord && mkdir /sdcard/screenrecord' | |
adb shell 'for i in `seq -f %02.0f 40`; do screenrecord /sdcard/screenrecord/$i.mp4; done' & |
This Gist describes how to tune HTTP browser cache expiration for static contents served by Wildfly Undertow web server, as per RFC-2616 section 13.
In order to change HTTP browser cache behavior, a "Cache-Control" HTTP header has to be added to static content HTTP responses returned by Undertow.
# installs to /opt/gradle | |
# existing versions are not overwritten/deleted | |
# seamless upgrades/downgrades | |
# $GRADLE_HOME points to latest *installed* (not released) | |
gradle_version=2.9 | |
wget -N https://services.gradle.org/distributions/gradle-${gradle_version}-all.zip | |
sudo unzip -foq gradle-${gradle_version}-all.zip -d /opt/gradle | |
sudo ln -sfn gradle-${gradle_version} /opt/gradle/latest | |
sudo printf "export GRADLE_HOME=/opt/gradle/latest\nexport PATH=\$PATH:\$GRADLE_HOME/bin" > /etc/profile.d/gradle.sh | |
. /etc/profile.d/gradle.sh |
import java.util.Arrays; | |
public class AlgorithmL { | |
public static void main(String[] args) { | |
if (args.length != 1) { | |
System.err.println("Usage: provide a string (quoted if multiword)"); | |
System.exit(1); | |
} | |
char[] letters = args[0].toCharArray(); | |
Arrays.sort(letters); |
package org.tempura.console.util; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
/** | |
* Usage: | |
* <li>String msg = Ansi.Red.and(Ansi.BgYellow).format("Hello %s", name)</li> | |
* <li>String msg = Ansi.Blink.colorize("BOOM!")</li> |