Skip to content

Instantly share code, notes, and snippets.

@mataha
mataha / fxp.mjs
Last active June 11, 2022 04:24
Get ladder data for a player in Fxp GunZ
#!/usr/bin/env -S node --experimental-fetch --no-warnings --tls-max-v1.3
import path from 'node:path';
import process from 'node:process';
import url from 'node:url';
const __filename = path.resolve(url.fileURLToPath(import.meta.url));
/**
* @typedef {Object} RankingQuery
@mataha
mataha / weather.dos
Last active October 3, 2022 00:30
wttr.in in your conhost.exe
weather=(powershell -NoProfile -NonInteractive "[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12; $place = [uri]::EscapeUriString($(If ([string]::IsNullOrWhiteSpace('$*')) { "${env:WTTR_LOCATION}" } Else { '$*' })); $weather = (Invoke-WebRequest "wttr.in/${place}?mF" -UseBasicParsing -Method 'Get' -UserAgent 'curl').Content; echo `r ${weather}.Replace($([char] 0x2196), $([char] 0x005C)).Replace($([char] 0x2197), $([char] 0x002F)).Replace($([char] 0x2198), $([char] 0x005C)).Replace($([char] 0x2199), $([char] 0x002F)).Replace($([char] 0x26A1).ToString(), $([char] 0x250C).ToString() + $([char] 0x2518).ToString()).Trim();")
// SPDX-License-Identifier: GPL-2.0-only
/*
* linux/fs/binfmt_script.c
*
* Copyright (C) 1996 Martin von Löwis
* original #!-checking implemented by tytso.
*/
#include <linux/module.h>
#include <linux/string.h>
:parse
@(verify "" || setlocal DisableDelayedExpansion EnableExtensions) 2>nul || (
(echo(Command Extensions could not be enabled; terminating the program.)
) >&2 && goto :EOF "Command Extensions could not be enabled"
@if not "-h" == "%~1" if not "-?" == "%~1" (goto :main)
@(
(echo(Language-independent ACP ^(active code page^) retrieval)
(echo()
@mataha
mataha / bootstrap.cmd
Last active July 3, 2024 14:46
curl shell test
:<<"#!/bin/sh"
::: curl -fsSL "..." | sh
::: | cmd /d/q/k echo off
@if not "%=^%=" == "%=%=" (set \p=^%<nul) else (set \p=%%<nul)
set last=
for /f delims^= %\p%l in ('^"doskey /history^"') do (set "last=%\p%~l")
if defined last (echo(Last command: "%last%")