Skip to content

Instantly share code, notes, and snippets.

View athphane's full-sized avatar
😡
(╯°□°)╯︵ ┻━┻

Athfan Khaleel athphane

😡
(╯°□°)╯︵ ┻━┻
View GitHub Profile
This file has been truncated, but you can view the full file.
<html>
<head><meta charset="utf-8" /></head>
<body>
<div> <script type="text/javascript">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>
<script type="text/javascript">/**
* plotly.js v2.24.1
* Copyright 2012-2023, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
@athphane
athphane / bitwarden-backup.sh
Created June 12, 2022 17:08
Bash script to zip up Vaultwarden data directory and upload to Cloud storage.
#!/bin/bash
#edit these to your config
BWDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
DATETIME="$(date +'%Y-%m-%d_%H-%M-%S')"
FOLDERPATH="$(date +'%Y-%m-%d')"
GZFILE=bitwarden-${DATETIME}.tar.gz
#change working dir to /tmp
cd /tmp/
@athphane
athphane / mdp-data.py
Created May 9, 2021 06:34
Script to scrape MDP Registry Data
import asyncio
import aiofiles as aiofiles
import aiohttp
async def download_file(reg):
file_name = f'downloads/{reg}.csv'
async with aiohttp.ClientSession() as session:
url = f'https://reg.mdp.org.mv/lists/?dhaairaa={reg}&download=1'
@athphane
athphane / bw-backup.sh
Created March 5, 2021 19:00
Script used to take backup of Bitwarden and upload to cloud using rclone
#!/bin/bash
echo "Running Bitwarden Backup Script"
echo "==============================="
export FOLDER_DATE=$(date +"%Y-%m-%d")
export DATE=$(date +"%Y-%m-%d-%H-%M-%S")
echo "The time is $DATE"
echo "==============================="
echo "Zipping Bitwarden Folder"
echo "==============================="
@athphane
athphane / trump-insults.csv
Last active February 22, 2021 16:25
trump insults
target insult
thomas-frieden fool
thomas-frieden DOPE
politicians all talk and no action
ben-cardin It's politicians like Cardin that have destroyed Baltimore.
neil-young total hypocrite
rockin-in-the-free-world didn't love it
willie-geist uncomfortable looking
jeb-bush will NEVER Make America Great Again
molly-sims a disaster
@athphane
athphane / netflix.csv
Created February 22, 2021 16:09
netflix titles
We can't make this file beautiful and searchable because it's too large.
show_id,type,title,director,cast,country,date_added,release_year,rating,duration,listed_in,description
s1,TV Show,3%,,"João Miguel, Bianca Comparato, Michel Gomes, Rodolfo Valente, Vaneza Oliveira, Rafael Lozano, Viviane Porto, Mel Fronckowiak, Sergio Mamberti, Zezé Motta, Celso Frateschi",Brazil,"August 14, 2020",2020,TV-MA,4 Seasons,"International TV Shows, TV Dramas, TV Sci-Fi & Fantasy","In a future where the elite inhabit an island paradise far from the crowded slums, you get one chance to join the 3% saved from squalor."
s2,Movie,7:19,Jorge Michel Grau,"Demián Bichir, Héctor Bonilla, Oscar Serrano, Azalia Ortiz, Octavio Michel, Carmen Beato",Mexico,"December 23, 2016",2016,TV-MA,93 min,"Dramas, International Movies","After a devastating earthquake hits Mexico City, trapped survivors from all walks of life wait to be rescued while trying desperately to stay alive."
s3,Movie,23:59,Gilbert Chan,"Tedd Chan, Stella Chung, Henley Hii, Lawrence Koh, Tommy Kuan, Josh Lai, Mark Lee, Susan Leong, Benjamin Lim",Si
import time
def emoji_cycle():
deq = deque(list("🌗🌘🌑🌒🌓🌔🌕🌖"))
for x in range(32):
time.sleep(0.3)
print("".join(deq))
deq.rotate(1)
if __name__ == '__main__':
@athphane
athphane / docker-automatic-media-server.md
Created January 15, 2020 16:19 — forked from matthewdowns/docker-automatic-media-server.md
Docker Automatic Media Server - Setup Guide

Introduction

This guide is focused on building a completely autonomous request-based media server using individual docker containers.

Most of the images we will be using are maintiained by linuxserver.io. They maintain many up-to-date versions of the most popular tools used for media servers.

Our full stack includes:

  • Plex Media Server - Plex Media Server is the back-end component to Plex, a self-hosted media platform.
  • Transmission - A lightweight torrent downloading client.
@athphane
athphane / carbon-now-pyrogram.py
Last active May 13, 2020 15:02
Get a pretty image of your code using carbon-now-cli in telegram.
"""
Turn your code into beautiful images using carbon-now-cli.
You will need npm installed on your machine to install carbon-now-cli..
Windows: npm install -g carbon-now-cli
Linux: sudo npm install -g carbon-now-cli --unsafe-perm=true --allow-root
MacOS: I assume almost the same as linux ¯\_(ツ)_/¯
"""
import os
from time import sleep