Skip to content

Instantly share code, notes, and snippets.


Franck Arnulfo farnulfo

View GitHub Profile
bric3 /
Last active Jul 28, 2020
misappropriate Jfr to log your own logs with unified logging, limited to some tag set though
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.util.Arrays;
import java.util.Set;
public class hacking_jvm_logging {
* Logging Level
* public enum LogLevel {
dominictarr /
Created Nov 26, 2018
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.


otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

thomasdarimont /
Last active Aug 11, 2019
Example to demonstrate sharing of ServerSocket ports with Java 9
import java.util.UUID;
paulirish / server-timing-demo.js
Last active May 11, 2020
Demo of server timing values. visualized in chrome devtools
View server-timing-demo.js
// see for screenshot:
const http = require('http');
function requestHandler(request, response) {
const headers = {
'Server-Timing': `
sql-1;desc="MySQL lookup Server";dur=100,
sql-2;dur=900;desc="MySQL shard Server #1",
paulirish /
Last active Nov 29, 2020
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$" "$extension_id%26uc" 
unzip -d "$extension_id-source" "$"

Thx to crxviewer for the magic download URL.

View gist:122907e95956602e5c09
// slack2html
// by @levelsio
piscisaureus /
Created Aug 13, 2012
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

hay / gist:1351230
Created Nov 9, 2011
Enterprisify your Java Class Names!
View gist:1351230
<!doctype html>
body {
background: white;
text-align: center;
padding: 20px;
font-family: Georgia, serif;
You can’t perform that action at this time.