Skip to content

Instantly share code, notes, and snippets.

Working from home

Jose Marcos Rodríguez Fernández jmrf

Working from home
View GitHub Profile
jmrf /
Last active Jul 13, 2020
Bash script to change Gnome and Shell themes and Terminal profiles between dark and light modes
#!/usr/bin/env bash
set -e
set -o pipefail
# Some useful commands to figure out what to tweak:
# * watch dconf changes being made:
# 'dconf watch /'
jmrf /
Created Jun 26, 2020 — forked from felipou/
DBeaver password decryption script - for newer versions of DBeaver
# requires pycrypto lib (pip install pycrypto)
import sys
import base64
import os
import json
from Crypto.Cipher import AES
jmrf / .tmux.conf
Created Jun 18, 2020
Tmux configuration
View .tmux.conf
# increase history limit to 90K lines
set-option -g history-limit 90000
# Enable mouse mode
set -g mouse on
# remap keys for copy-mode
bind -t vi-copy y copy-pipe "xclip -sel clip -i"
setw -g mode-keys vi
jmrf /
Created Jun 7, 2020
Jupyter Kernel with virtual env or conda envs

For jupyter notebooks to identify your virtual env kernels:

  1. Activate your env and install ipykernel:
pip install --user ipykernel
  1. Add your virtual environment to Jupyter:
python -m ipykernel install --user --name=myenv
jmrf /
Created May 30, 2020
Install postman (not the snap version)
# Download postman (instead of the snap from the Ubuntu Software Store)
wget -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
rm postman.tar.gz
sudo ln -s /opt/Postman/Postman /usr/bin/postman
# Create a desktop entry
cat > ~/.local/share/applications/postman.desktop <<EOL
[Desktop Entry]
jmrf /
Created May 22, 2020
Utilities to analyse python dependencies

Draw a graph of dependencies

pydeps: Python module dependency visualization

# Draw a graph for <package> with max depth of 3 and cluster expernal deps. Produces an .svg file
pydeps <my-package> 
  --noshow \
  --max-bacon 3 \
  --cluster \
jmrf /
Last active May 21, 2020
Install NVIDIA drivers and CUDA for Ubuntu 18.04 LTS
# ========================== FROM FILES ==========================
# DOwnload NVIDIA drivers (installing from run file to avoid openGL libraries:
sudo chmod +x
jmrf /
Created Apr 29, 2020
A collection of useful python wrapper functions
import time
from functools import wraps
from typing import List
from typing import Union
import numpy as np
import psutil
from sklearn import preprocessing
jmrf / local_vscode_settings.jsonc
Last active May 21, 2020
VSCode custom color settings collection to differentiate between multiple opened instances
View local_vscode_settings.jsonc
"workbench.colorCustomizations": {
// activity bar
"activityBar.background": "#CE3C63",
"activityBar.inactiveForeground": "#c5c4c4",
"activityBar.activeBackground": "#FBE9B7",
"activityBar.activeBorder": "#04B9B0",
// badge
"activityBarBadge.background": "#04B9B0",
jmrf /
Last active Mar 22, 2020 — forked from rbf/Default (OSX).sublime-keymap
A simple way to toggle between dark and light themes in Sublime Text 2, also for open files in the .workspace settings file.
# From
# Forked from
# // Copy this to your keybindings (Preferences > Key Bindings - User)
# // Change the keybinding, color schemes, and themes to your preferences
# {
# "keys": ["ctrl+shift+s"], "command": "toggle_color_scheme",
# "args": {
# "light_color_scheme": "Packages/User/Soda Light - Espresso.tmTheme",
You can’t perform that action at this time.