Skip to content

Instantly share code, notes, and snippets.

View etherealxx's full-sized avatar
💭
still learning stuff

Etherealxx etherealxx

💭
still learning stuff
View GitHub Profile
@arfan
arfan / jadwalsholat
Last active October 25, 2023 21:16
jadwal sholat command line using python and curl with api from myquran, hard coded jakarta city
#!/bin/python
import json
import subprocess
from datetime import datetime
now = datetime.now()
current_date = now.strftime("%Y/%m/%d")
jakarta_city_code = "1301"
result = subprocess.run(["curl", f"https://api.myquran.com/v1/sholat/jadwal/{jakarta_city_code}/{current_date}"],
@qzm
qzm / aria2.conf
Last active June 6, 2024 19:23
Best aria2 Config
### Basic ###
# The directory to store the downloaded file.
dir=${HOME}/Downloads
# Downloads the URIs listed in FILE.
input-file=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to FILE on exit.
save-session=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0
save-session-interval=60
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5
@treuille
treuille / pagination.py
Created October 2, 2019 19:05
Answer: A simple paginator in Streamlit
import streamlit as st
import numpy as np
def paginator(label, items, items_per_page=10, on_sidebar=True):
"""Lets the user paginate a set of items.
Parameters
----------
label : str
The label to display over the pagination widget.
@miabrahams
miabrahams / FfmpegPostprocess.py
Last active March 2, 2024 18:07
Ffmpeg post-processing OBS Plugin
import obspython as obs
import subprocess
import os
import re
import datetime
# Info for potential OBS Python hackers!
# Tip 1 - Read the "OBS Studio Backend Design" documentation page. Read the documentation table of contents.
# Tip 2 - be sure to add obspython.py to your script path to enable completion.
# Tip 3 - Some of the Python API is generated at runtime, so it won't show up in obspython.py.
@shadowmoose
shadowmoose / Audio-Merge.md
Last active December 7, 2022 20:30
Merge multiple audio tracks inside a video file

About

This is a simple script to combine two of a video file's audio tracks into one. It doesn't impact the video's quality.

To make things even more simple, it only prompts for an input/output video using file selectors. The rest is handled automatically.

This is a simple utility to rapidly "fix" videos with split audio tracks, such as those recorded by ShadowPlay or OBS.

To use this script, simply copy/paste the "merge.ps1" code below into a new file named "merge.ps1", then launch it.

@ngtvspc
ngtvspc / EXIF_remover.py
Created January 9, 2018 23:00
Remove EXIF metadata from images
# Uses the Python Imaging Library
# `pip install Pillow` works too
from PIL import Image
image_filename = "picture_with_EXIF.jpg"
image_file = open('image_filename)
image = Image.open(image_file)
# next 3 lines strip exif
image_data = list(image.getdata())
@graffic
graffic / steam.md
Last active December 28, 2023 03:09
Downloading steam games from another computer/faster line

Framing the issue

With almost no bandwith at home, I needed a way to download DOOM that didn't involve blocking the home internet line for two days.

Approach

Using steamcmd you can use any computer to download steam games.

Downloading

  1. Install it
  2. Open it and loging with your username and password: login username password
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active July 16, 2024 09:07
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@richard512
richard512 / ffmpeg-convert.sh
Last active December 22, 2022 01:45
ffmpeg merge and convert between webm, wav, and opus
#/bin/bash
# ffmpeg convert wav audio to opus audio
ffmpeg -i uploads/audio.wav -c:a opus -strict -2 -y uploads/output.opus
# ffmpeg combine webm and wav into a new webm with opus audio
ffmpeg -i uploads/video.webm -i uploads/audio.wav -c:a opus -strict -2 -y uploads/output.webm
@Manouchehri
Manouchehri / rfc3161.txt
Last active July 10, 2024 06:32
List of free rfc3161 servers.
https://rfc3161.ai.moda
https://rfc3161.ai.moda/adobe
https://rfc3161.ai.moda/microsoft
https://rfc3161.ai.moda/apple
https://rfc3161.ai.moda/any
http://rfc3161.ai.moda
http://timestamp.digicert.com
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.sectigo.com