This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
function mount_snap() { | |
local snap_name=$1 | |
local snap_version=$(snap list | grep $snap_name | awk '{print $3}') | |
local snap_name_escaped=$(echo $snap_name | sed 's/-/\\x2d/g') | |
local snap_dir=/var/lib/snapd/snaps | |
local tmp_dir=$(mktemp -d) | |
sudo systemctl stop snap-$snap_name_escaped-$snap_version.mount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Add copy to clipboard from IPython! | |
To install, just copy it to your profile/startup directory, typically: | |
~/.ipython/profile_default/startup/ | |
Example usage: | |
%clip hello world | |
# will store "hello world" | |
a = [1, 2, 3] | |
%clip a | |
# will store "[1, 2, 3]" |