Skip to content

Instantly share code, notes, and snippets.

View dannyvoid's full-sized avatar
💭
I may be slow to respond.

:) dannyvoid

💭
I may be slow to respond.
View GitHub Profile
@dannyvoid
dannyvoid / auto_archive_starfield_saves.bat
Last active September 7, 2023 23:41
auto backup starfield saves
@echo off
setlocal enabledelayedexpansion
:: Configuration variables
set "game_save_folder=C:\Users\perso\OneDrive\Documents\My Games\Starfield\Saves"
set "backup_folder=E:\.saves"
set "wait_minutes=10"
set "task_name=BackupStarfield"
goto start
@dannyvoid
dannyvoid / function.py
Created June 3, 2018 06:45
Function to download latest asset from a Github Repo
import requests
import urllib.request
import os
def update_from_github(github_username, github_repo, github_asset, local_directory):
github_repo_url = 'https://github.com/{}/{}/releases/latest'.format(github_username, github_repo)
github_asset_url = requests.get(github_repo_url).url.replace('tag', 'download') + '/' + github_asset
destination = os.path.join(local_directory, github_asset)
try:
@dannyvoid
dannyvoid / countdown.py
Last active December 1, 2021 08:21 — forked from morion4000/countdown.py
Python countdown to date script
from datetime import datetime
def time_to_seconds(date1, date2):
timedelta = date2 - date1
return timedelta.days * 24 * 3600 + timedelta.seconds
def human_time(seconds):
minutes, seconds = divmod(seconds, 60)