This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RandomTeleporter { | |
private final LoadingCache<Pair<Location, Location>, List<Pair<Integer, Integer>>> locationCache = CacheBuilder.newBuilder() | |
.expireAfterAccess(1, TimeUnit.MINUTES) | |
.maximumSize(5) | |
.build(new CacheLoader<Pair<Location, Location>, List<Pair<Integer, Integer>>>() { | |
@Override | |
public List<Pair<Integer, Integer>> load(Pair<Location, Location> bounds) throws Exception { | |
final List<Pair<Integer, Integer>> ret = new ArrayList<>(); | |
final Location bounds1 = bounds.getLeft(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!(Get-Command git -ErrorAction SilentlyContinue)) { | |
$gitDir = "$env:LOCALAPPDATA\CustomGit" | |
if(Test-Path $gitDir) { Remove-Item -Path $gitDir -Recurse -Force } | |
New-Item -Path $gitDir -ItemType Directory | |
$gitLatestReleaseApi = (Invoke-WebRequest -UseBasicParsing https://api.github.com/repos/git-for-windows/git/releases/latest).Content | ConvertFrom-Json | |
$mingitObject = $gitLatestReleaseApi.assets ` | |
| Where-Object {$_.name -match "MinGit-[\d.]*?-64-bit.zip"} ` | |
| Select-Object browser_download_url |
OlderNewer