Skip to content

Instantly share code, notes, and snippets.

View pakoito's full-sized avatar
🎨
painting boxes

Paco pakoito

🎨
painting boxes
View GitHub Profile
{
"title": "War For Rayuba Round 8",
"description": "A War for Rayuba master set of comics for round 8. PLEASE NOTE: This collection only includes comics that were submitted as imgur links; it does not include comics submitted directly through discord, twitter, or anything outside imgur. You will still need to access the discord and view those battle channels to view those. \r\n ...And You should!\r\n\r\n The following characters are not represented here:\r\n Erasmus, Al Railcatcher, Razzberry Tallshark, Brazen Pun, Girl with Gun, Yama and Soot, and Kazuhiro Kindle.",
"artist": "Various artists on the WFR Discord (check each comic)",
"author": "Various artists on the WFR Discord (check each comic)",
"cover": "https://i.imgur.com/JITtuqw.jpg",
"chapters": {
"3": {
"title": "Vessel Corpse",
"volume": "8",
{
"title": "War For Rayuba Round 9 GBc Pyre Collab",
"description": "",
"artist": "28 Quicksilver, Pretzel Man & Borginskov",
"author": "28 Quicksilver, Pretzel Man & Borginskov",
"cover": "https://i.imgur.com/HT3OOc8.jpeg",
"chapters": {
"1": {
"title": "Part 1",
"volume": "9",
add_newline = true
[character]
success_symbol = "[ƛ](bold green)"
error_symbol = "[ƛ](bold red)"
[git_branch]
format = ": [$symbol$branch]($style) } "
[java]
@pakoito
pakoito / ContextN.kt
Last active February 13, 2022 15:24
ContextN
inline fun <A, T> withN(t: T, f: context(T) () -> A) =
with(t) { f() }
inline fun <A, T, U> withN(t: T, u: U, f: context(T, U) () -> A) =
with(t) { with(u) { f() } }
inline fun <A, T, U, V> withN(t: T, u: U, v: V, f: context(T, U, V) () -> A) =
with(t) { with(u) { with(v) { f() } } }
inline fun <A, T, U, V, W> withN(t: T, u: U, v: V, w: W, f: context(T, U, V, W) () -> A) =
data class User(
val name: String
)
interface GetUserService {
fun Id.fetchUser(): User
}
context(Context)
fun makeGetUserService(): GetUserService = object : GetUserService {
@pakoito
pakoito / forge.cmd
Last active January 11, 2022 17:35
MTG Forge Windows Launcher
::@echo off
pushd %~dp0
java -version 1>nul 2>nul || (
echo no java installed
popd
exit /b 2
)
for /f tokens^=2^ delims^=.-_^+^" %%j in ('java -fullversion 2^>^&1') do set "jver=%%j"
pdfx() {
name=$(basename $3 .pdf)
for i in {0..$(expr $(vipsheader -f pdf-n_pages $3) - 1)}; do
noglob vips copy $3[dpi=$1,page=$i] $(realpath $2)/$name-$(expr $i + 1)@$1.jpg;
done
}
# cmd dpi outdir infile
# pdfx 300 ./out mypdf.pdf
private fun loggedInMenuUi(menu: Menu, rootView: View, checkoutCartStream: Stream<Bla>, startActivity: () -> Unit) {
val alertMenuItem = menu.findItem(R.id.activity_main_alerts_menu_item)
val rootView = (alertMenuItem.actionView as FrameLayout).apply {
setOnClickListener {
startActivity()
}
}
val redCircle: FrameLayout = rootView.findViewById(R.id.view_alert_red_circle)
when (info) {
null -> {
return unauthorized()
}
else -> {
val validInfo = validator.validateInfo(info)
when (validInfo) {
is Either.Right -> {
if (!validInfo.b.authorised) {