Skip to content

Instantly share code, notes, and snippets.

View VimalMollyn's full-sized avatar
💡

Vimal Mollyn VimalMollyn

💡
View GitHub Profile
@VimalMollyn
VimalMollyn / pause_dropbox_sync.py
Created February 21, 2024 07:46
Auto Pause and Resume Dropbox sync on MacOS with python
import subprocess
def run_apple_script(apple_script):
result = subprocess.run(['osascript', '-e', apple_script], capture_output=True, text=True)
if result.returncode == 0:
return result.stdout
else:
raise Exception(result.stderr)
# Example usage
@VimalMollyn
VimalMollyn / read_history.py
Created December 29, 2023 22:41
Read through Chrome history with python and pandas
import sqlite3
from pathlib import Path
import pandas as pd
from datetime import datetime, timedelta
import IPython
path_to_history = Path("./history")
conn = sqlite3.connect(path_to_history)
@VimalMollyn
VimalMollyn / make_website.fish
Last active November 10, 2022 15:57
Ghost static site generator
function make_website --description "Recreated my website"
set hostServer $argv[1]
set hostURL (string split "http://" $hostServer)[2]
set websiteDir $argv[2]
set domainName $argv[3]
set currDir (pwd)
cd $websiteDir