This file contains hidden or 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 | |
clipboard-history(){ | |
for (( i=0; i<20 ; i++ )) ; do | |
qdbus org.kde.plasmashell /klipper org.kde.klipper.klipper.getClipboardHistoryItem $i | paste -sd ' ' | cut -c1-80 | |
done | |
} | |
selected=$(clipboard-history | rofi -dmenu -format i -i -p "clipboard") | |
if [ $? == 0 ] ; then |
This file contains hidden or 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/env python3 | |
# A better implementation of simple http server, it allows for: | |
# - logging of headers and body content | |
# - serving files on a directory | |
# - saving files in body into an output directory | |
import http.server | |
import argparse | |
import sys |
This file contains hidden or 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
var originalOpen = originalOpen ? originalOpen : XMLHttpRequest.prototype.open; | |
XMLHttpRequest.prototype.open = function (method, url) { | |
this._url = url; | |
return originalOpen.apply(this, arguments); | |
}; | |
const MESSAGE = [ | |
{ | |
type: "rich_text", | |
elements: [ |
This file contains hidden or 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 | |
# Open an excel file in google sheets | |
# Reads file contents from stdin. The first argument is the name of the file, if omited 'temp.xlsx' is given | |
# You'll need to give your own key underneath. If you don't have one just inspect a drive file upload request and get it from there | |
# NOTE Depends on ./extract_cookies.sh script (https://gist.github.com/hackerb9/d382e09683a52dcac492ebcdaf1b79af) | |
APIKEY='<your-api-key>' | |
$(dirname ${BASH_SOURCE[0]})/extract_cookies.sh ~/.mozilla/firefox/*.default-release/cookies.sqlite > /tmp/sheets_upload_cookies.txt |
This file contains hidden or 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 | |
# vi: foldmethod=marker | |
# This script install most of the dependencies needed along with intel compiler | |
# - zlib | |
# - hdf5 | |
# - netcdf4 | |
# - netcdf4-fortran | |
# - eccodes | |
# - cdo |