Skip to content

Instantly share code, notes, and snippets.

View antiops's full-sized avatar

Anti Ops antiops

View GitHub Profile
@antiops
antiops / console.js
Created July 7, 2023 12:41
Get total amount of Discord servers youre in
fetch('https://discord.com/api/users/@me/guilds', {
headers: {
authorization: 'YOUR_TOKEN'
}
})
.then(res => res.json())
.then(data => {
console.log(`[info] Total Server Count: ${data.length}`)
// Display object with all guild metadata
// console.log(data)
@antiops
antiops / human_readable.sh
Last active May 22, 2024 07:36 — forked from agunnerson-ibm/human_readable.sh
Bash function to convert bytes to human readable size
# Copyright 2015 Andrew Gunnerson <[email protected]>
# Copyright 2024 antiops@github
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software