Skip to content

Instantly share code, notes, and snippets.

@jhonasn
jhonasn / media-reducer.sh
Last active December 16, 2022 20:37
This script converts all at once pictures and videos to reduce their sizes from one directory to another mantaning the directory structure. Ideal to use when you want to share some pictures or earn some disc space.
#!/bin/bash
clear
#rm -r lasttrip-converted/ # Debug to delete last try
originpath=`readlink -f "$1"`
destinpath=`readlink -f "$2"`
function showhelp {
@jhonasn
jhonasn / gnome-switch-night-mode.py
Created November 20, 2020 22:07
script to switch gnome, gedit and atom theme between light and dark. made for better day/night readability.
#!/usr/bin/env python3
from sys import argv, exit
from os import popen
from os.path import join, expanduser as get_path
from re import search
if '-h' in argv or '--help' in argv:
print('''
Executing this program will invert dark/light colors
@jhonasn
jhonasn / convert-keep-notes-to-md.py
Last active January 5, 2024 08:22
A script to convert google keep notes to a bunch markdown files aiming mainly to nextcloud notes
#!/usr/bin/env python3
# from pdb import set_trace as bkp
from sys import argv, exit
from os import listdir, path, mkdir, utime
from json import loads as to_dict
from datetime import datetime as date
if '-h' in argv or '--help' in argv:
print('''
" no compatible with vi
set nocompatible
" color syntax
"syntax enable
" real colors
set termguicolors
" for netrw
filetype plugin on
" show number