This file contains hidden or 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
class CustomMap<K, V> implements Iterable<V> { | |
private map: Map<K, LinkedNode<V>>; | |
// The first element of the linked list | |
private first: LinkedNode<V> | null; | |
// Represents the last element (in order) | |
// this field will null if and only if `first` is null | |
private last: LinkedNode<V> | null; | |
constructor() { | |
this.map = new Map(); |
This file contains hidden or 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
#!/usr/bin/env bash | |
# Lists all sha1 hashes of a packwiz pack. Requires internet | |
# Usage ./packwiz_hashes <pack> | |
cd $1 | |
# Curseforge is mostly already in sha1 | |
grep -l "mode = \"metadata:curseforge\"" -r **/*.pw.toml | xargs -I %s grep "hash =" %s | cut -d '"' -f2 | cut -d '"' -f1 | |
# Convert urls to sha1 | |
grep "url =" -r **/*.pw.toml | cut -d '"' -f2 | cut -d '"' -f1 | xargs -I %s bash -c "curl -sL \"%s\" | sha1sum" | cut -d " " -f1 | |
# Grab all loose jars |