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
# Beware! This file is rewritten by htop when settings are changed in the interface. | |
# The parser is also very primitive, and not human-friendly. | |
fields=0 48 17 111 2 46 47 49 1 | |
sort_key=0 | |
sort_direction=1 | |
hide_threads=0 | |
hide_kernel_threads=1 | |
hide_userland_threads=0 | |
shadow_other_users=0 | |
show_thread_names=1 |
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
fn main() { | |
let base_hp = 479.; | |
let base_def = 58.; | |
print!("Revenant Armor (50k)"); | |
let mut rev = RevArmor::new(base_hp, base_def, 280. * 3., 5., 5., 0.); | |
tank(&mut rev); | |
print!("Revenant Armor (25k)"); | |
let mut rev = RevArmor::new(base_hp, base_def, 260. * 3., 5., 5., 0.); |
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
<?php | |
/** | |
* Usage: php dsa-notification.php | |
* In cron (hourly): 0 * * * * cd /absolute/path/of/your/directory && php dsa-notification.php | |
*/ | |
$hooks = ["https://discordapp.com/api/webhooks/{webhook.id}/{webhook.token}"]; | |
if (php_sapi_name() == "cli") { | |
$knownDSA = json_decode(file_get_contents("dsaCache"), true); | |
$rssFeed = simplexml_load_string(file_get_contents("https://www.debian.org/security/dsa")); |
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
#!/bin/sh | |
### | |
### License: Public Domain, or the equivalent in your jurisdiction | |
### USE AT YOUR OWN RISK, I WILL NOT TAKE ANY RESPONSIBILITY IF YOU USED THIS AND FUCKED UP YOUR REPOSITORY. | |
### | |
### # Description | |
### Updates usernames on your old repositories. | |
### | |
# I know it's a bad hack but I'm too lazy to even do the replace command in an editor |
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
const TIME_OFFSET: f64 = 1559829300.0; | |
pub fn unix_to_date(mut unix: f64) -> String { | |
let time = (unix - TIME_OFFSET) as u64; | |
let year = time / 12 / 31 / 1200; | |
let month = (time / 31 / 1200) % 12; | |
let day = ((time / 1200) % 31) + 1; | |
format!("Year {}, {} {}{}", year, month_str(month), day, day_suffix(day)) |
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
<?php | |
const REPO_DIR = "/env"; | |
const DISCORD_WEBHOOK = "..."; | |
const TOKEN = "..."; | |
if (key_exists('auth', $_GET) && $_GET['auth'] == TOKEN) { | |
$payload = json_decode($_POST['payload'], true); | |
if (key_exists("action", $payload) && | |
$payload["action"] == "closed" && |
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
const brackets: Array<[number, number]> = [ | |
[ 0, 0], | |
[ 18200, 19], | |
[ 45000, 32.5], | |
[ 120000, 37], | |
[ 180000, 45] | |
]; | |
console.log("Income", "Tax"); |
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
#!/usr/bin/python3 | |
from socket import gethostname | |
from requests import post | |
WEBHOOK_URL='' | |
USERNAME=gethostname() + ' /proc/mdstat' | |
with open('/proc/mdstat') as f: | |
mdstat = f.read() |
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
#!/bin/bash | |
TOKEN='YOUR_TOKEN_HERE' | |
FINGERPRINT=$(hostname | sha1sum) | |
IMAGE_PATH='/tmp/snapshot.jpg' | |
libcamera-jpeg -n --rotation 180 -o "$IMAGE_PATH" | |
curl -X PUT \ | |
-H "Token: $TOKEN" \ | |
-H "Fingerprint: $FINGERPRINT" \ |
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
/// License: Public Domain, or MIT License where Public Domain is not available | |
import Foundation | |
extension UUID { | |
/// Implementation of UUIDv7 generator based on the specifications in draft-ietf-uuidrev-rfc4122bis-14 | |
/// | |
/// UUIDv7 is generated without using any additional methods of Monotonicity Guarantees. (Section 6.2) As such, the UUID is accurate to the millisecond only. | |
/// | |
// Field and Bit Layout: |