Skip to content

Instantly share code, notes, and snippets.

/**
* Wrap a Supplier in a try-catch, if an exception of class exceptionClass is caught, an empty Optional is returned.
*/
public static <T> Optional<T> expect(Supplier<T> supplier, Class<? extends Exception> exceptionClass) {
try {
return Optional.ofNullable(supplier.get());
}
catch (Exception ex) {
if (exceptionClass.isInstance(ex)) {
return Optional.empty();
The Atlas of Worlds:
The Atlas of Worlds lets you track your progression through Path of Exile's map endgame. You can also use it to upgrade maps and add mods to the Atlas. It indicates which maps are connected to each other.
The map drop rules have been changed so that connected maps and maps you've previously completed can drop from the area you're playing. As you progress towards the center of the Atlas from the four corners, the tier of maps increases.
There are four tier 16 maps that contain the Guardians of the Void. As you defeat them, you'll earn fragments of a key that allows you to challenge the Shaper himself.
As you complete more types of maps, you unlock a cumulative map tier bonus that is displayed on the Atlas.
You can upgrade white or yellow maps by five tiers using a Shaper's Orb, which can be earned by completing bonus objectives on specific maps.
You can add temporary mods to the Atlas itself using Cartographer's Sextants.
Your progress, upgrades and mods on the Atlas of Worlds are shared b
@thirdy
thirdy / strx.ahk
Created September 20, 2016 00:39
StrX AHK Function by SKAN
; Cleanup StrX function and Google Example from https://autohotkey.com/board/topic/47368-strx-auto-parser-for-xml-html
; By SKAN
;1 ) H = HayStack. The "Source Text"
;2 ) BS = BeginStr. Pass a String that will result at the left extreme of Resultant String
;3 ) BO = BeginOffset.
; Number of Characters to omit from the left extreme of "Source Text" while searching for BeginStr
; Pass a 0 to search in reverse ( from right-to-left ) in "Source Text"
; If you intend to call StrX() from a Loop, pass the same variable used as 8th Parameter, which will simplify the parsing process.
;4 ) BT = BeginTrim.
public static final int VC_ESCAPE = 1;
public static final int VC_F1 = 59;
public static final int VC_F2 = 60;
public static final int VC_F3 = 61;
public static final int VC_F4 = 62;
public static final int VC_F5 = 63;
public static final int VC_F6 = 64;
public static final int VC_F7 = 65;
public static final int VC_F8 = 66;
public static final int VC_F9 = 67;
@thirdy
thirdy / SocialistStarterPack.md
Last active August 16, 2024 06:10
Socialist Starter Pack
@thirdy
thirdy / free-software-notes.txt
Last active February 24, 2017 02:03
My notes on my brown bag talk about Free Software
Buying a product and the right to know about it
* Pencil - lead
* A pet Dog
* Siopao
* Painting
* House
* Book
Copyright
* a legal right created by the law of a country that grants the creator of an original work exclusive rights for its use and distribution
@thirdy
thirdy / cph-bookmarklet.js
Last active May 29, 2017 00:27
Bookmarklet for assisting buy and sell decisions in coins.ph
/* Copyright 2017 Vicente de Rivera III
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@thirdy
thirdy / readinglist.md
Last active October 27, 2017 16:07
List of materials read or being read

Materials being read in progress are noted, otherwise finished reading.

Blog

  1. Just Say No to More End-to-End Tests - https://testing.googleblog.com/2015/04/just-say-no-to-more-end-to-end-tests.html
  • Note on Java exceptions: One sure way to help in easily understanding problems is to have a well designed exception mechanism. You do not want generic exceptions like RuntimeException. You do not want badly wrapped exceptions - I've seen a string manipulation method that throws HttpInternalServerException. Ideally you need an exception stack trace that provides you context and a consistent way of reading them. And most important of all, you do not want exceptions getting lost somewhere. A big problem with a codebase that is already using badly designed exception is that it can be a risky change since it will probabably affect most of the existing code - imagine an exception class that is written in an xml config.
  • Note on the [linked sample source code](https://github.com/google/guava/blob/master/gu
https://superuser.com/questions/468580/create-application-shortcut-chromes-feature-in-firefox
; Bind F1 to a single Mouse Click
; This is my first AutoIt script
; Motivation for this script is to ease pressure to my right index finger
; License - GPLv3
#include <AutoItConstants.au3>
HotKeySet("{F1}", "MouseSingleClick")
While 1