I hereby claim:
- I am benhardy on github.
- I am benhardy (https://keybase.io/benhardy) on keybase.
- I have a public key whose fingerprint is E6EC 21D8 301F 8F48 375C D6C7 F32A 2090 4F46 ED42
To claim this, I am signing this object:
public static <T> Stream<T> asStream(final Enumeration<T> horror) { | |
if (horror.hasMoreElements()) { | |
return Stream.concat(Stream.of(horror.nextElement()), asStream(horror)); | |
} else { | |
return Stream.empty(); | |
} | |
} |
public static <T> Iterable<T> asIterable(final Enumeration<T> anotherHorribleEnumeration) { | |
return () -> new Iterator<T>() { | |
@Override | |
public boolean hasNext() { | |
return anotherHorribleEnumeration.hasMoreElements(); | |
} | |
@Override | |
public T next() { | |
return anotherHorribleEnumeration.nextElement(); |
I hereby claim:
To claim this, I am signing this object:
Aug 21 00:14:10 ci-na-frontdoor-03 kernel: imklog 5.8.6, log source = /proc/kmsg started. | |
Aug 21 00:14:10 ci-na-frontdoor-03 kernel: [ 0.000000] Initializing cgroup subsys cpuset | |
Aug 21 00:14:10 ci-na-frontdoor-03 kernel: [ 0.000000] Initializing cgroup subsys cpu | |
Aug 21 00:14:10 ci-na-frontdoor-03 kernel: [ 0.000000] Linux version 3.2.0-67-generic (buildd@brownie) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #101-Ubuntu SMP Tue Jul 15 17:46:11 UTC 2014 (Ubuntu 3.2.0-67.101-generic 3.2.60) | |
Aug 21 00:14:10 ci-na-frontdoor-03 kernel: [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.2.0-67-generic root=UUID=02102d06-ff39-4079-899f-c3ec91691ea3 ro quiet splash | |
Aug 21 00:14:10 ci-na-frontdoor-03 kernel: [ 0.000000] KERNEL supported cpus: | |
Aug 21 00:14:10 ci-na-frontdoor-03 kernel: [ 0.000000] Intel GenuineIntel | |
Aug 21 00:14:10 ci-na-frontdoor-03 kernel: [ 0.000000] AMD AuthenticAMD | |
Aug 21 00:14:10 ci-na-frontdoor-03 kernel: [ 0.000000] Centaur CentaurHauls | |
Aug 21 00:14:10 ci |
#!/usr/bin/env sh | |
TARBALL_URL=$1 | |
APP_NAME=$2 | |
echo "Cleaning up any previous $APP_NAME directory" | |
rm -rf $APP_NAME | |
echo "curling $TARBALL_URL -> $APP_NAME.tgz" | |
curl $TARBALL_URL -o $APP_NAME.tgz |
I hereby claim:
To claim this, I am signing this object:
public List<String> randomDictionaryWords() throws IOException { | |
try (InputStream is = new FileInputStream(new File("/usr/share/dict/words"))) { | |
BufferedReader br = new BufferedReader(new InputStreamReader(is)); | |
return br.lines() | |
.filter(line -> line.length() >= MIN_WORD_LENGTH && line.length() <= MAX_WORD_LENGTH) | |
.filter(word -> word.equals(word.toLowerCase())) | |
.filter(word -> random() < DICTIONARY_SAMPLING_RATE) | |
.limit(50) | |
.collect(Collectors.toList()); |
/** | |
* See bottom for file for example spheres scene | |
*/ | |
import java.awt.Color | |
import java.awt.image.BufferedImage | |
import java.io.File | |
import javax.imageio.ImageIO | |
import math.sqrt | |
import math.min | |
import math.max |
// Generate a broccoli like structure | |
#include "colors.inc" | |
#include "textures.inc" | |
light_source { | |
<-100, 400,-200> | |
color <0.8,0.8,0.8> | |
area_light <50,0,0>, <0,0,50>, 5, 5 | |
adaptive 1 | |
jitter |
/** | |
* Our instance of WebApplicationInitializer. This replaces web.xml for the initial | |
* configuration of the servlet. | |
*/ | |
class WebAppInit extends WebApplicationInitializer { | |
override def onStartup(servletContext: ServletContext) { | |
// Create the 'root' Spring application context | |
val root = new AnnotationConfigWebApplicationContext() |