Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
Methinks web-development should not exist

Isaac Kogan isaackogan

🤔
Methinks web-development should not exist
View GitHub Profile
@isaackogan
isaackogan / secondsToMilitaryTimestamp.js
Last active Mar 2, 2022
Convert seconds into DD:HH:MM:SS format that automatically removes leading values and does not include leading zeroes in the first non-zero value.
View secondsToMilitaryTimestamp.js
function secondsToMilitary(seconds) {
let negative = seconds < 0;
seconds = Math.abs(Math.floor(seconds));
/*
Less than 60 seconds
*/
if (seconds < 60) {
return "00:" + ((seconds > 10) ? seconds.toString() : '0' + seconds)
View React Site Pterodactyl Egg
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v1",
"update_url": null
},
"exported_at": "2022-02-17T12:45:09-05:00",
"name": "NodeJS Server",
"author": "yajtpg@gmail.com",
"description": "NodeJS Universal Egg.",
@isaackogan
isaackogan / uvicorn-fastapi-egg.json
Created Oct 11, 2021
Pterodactyl.io Uvicorn FastAPI Python Egg
View uvicorn-fastapi-egg.json
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v1",
"update_url": null
},
"exported_at": "2021-10-10T21:10:16-04:00",
"name": "FastAPI (Uvicorn)",
"author": "parker@parkervcp.com",
"description": "A Discord bot written in Python using discord.py\r\n\r\nhttps:\/\/github.com\/Ispira\/pixel-bot",
@isaackogan
isaackogan / milestone.py
Last active Aug 23, 2021
[Python] Milestone Caculation
View milestone.py
from typing import Optional
def roundup(x: int, tens: int) -> int:
val: int = int("1" + ("0" * tens))
return x if x % val == 0 else x + val - x % val
def halfway(x: int) -> int:
val: int = int("5" + ("0" * (len(str(x)) - 2)))