These scripts use fzf
and sqlite
to efficiently query your firefox history and bookmarks.
This is heavily inspired by a post from the creator of fzf
: https://junegunn.kr/2015/04/browsing-chrome-history-with-fzf/.
fzf
allows you to select multiple items and the results returned will be the URLs.
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
# to simplify life, install xclip and append the following lines to your .bashrc | |
alias "c=xclip" # copy to X clipboard (register *) | |
alias "cs=xclip -selection clipboard" # copy to system wide clipboard (register +) | |
alias "v=xclip -o" # output copied content (paste) | |
alias "vs=xclip -o -selection clipboard" # paste from system wide clipboard (equivalent to `v -selection clipboard`) | |
# examples: | |
# copy to X: | |
# go to the same directory in terminal 2 as in terminal 1 | |
# Terminal 1: |
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 | |
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine | |
# Used to provide DDNS service for my home | |
# Needs the DNS record pre-creating on Cloudflare | |
# Proxy - uncomment and provide details if using a proxy | |
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport> | |
# Cloudflare zone is the zone which holds the record |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
#hashapass.com method for generating passwords | |
#script by Simon Elmir | |
export IFS="" #read will now preserve whitespace | |
read -rp "parameter: " PARAMETER | |
read -rsp "password: " PASSWORD | |
echo | |
echo -n "$PARAMETER" \ | |
| openssl dgst -sha1 -binary -hmac "$PASSWORD" \ | |
| openssl enc -base64 \ |
On an Debian/Ubuntu-based system, to install texlive-full
without docs and language packs, simply do this:
sudo apt install `sudo apt --assume-no install texlive-full | \
awk '/The following additional packages will be installed/{f=1;next} /Suggested packages/{f=0} f' | \
tr ' ' '\n' | grep -vP 'doc$' | grep -vP 'texlive-lang' | grep -vP 'latex-cjk' | tr '\n' ' '`
After this, if you wish to install the language packs, selectively install them. E.g.:
On an Debian/Ubuntu-based system, to install texlive-full
without docs and language packs, simply do this:
sudo apt install `sudo apt --assume-no install texlive-full | \
awk '/The following additional packages will be installed/{f=1;next} /Suggested packages/{f=0} f' | \
tr ' ' '\n' | grep -vP 'doc$' | grep -vP 'texlive-lang' | grep -vP 'latex-cjk' | tr '\n' ' '`
After this, if you wish to install the language packs, selectively install them. E.g.:
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
#start /home/serg/.config/QtProject/qtcreator/styles/onedark.xml | |
<?xml version="1.0" encoding="UTF-8"?> | |
<style-scheme version="1.0" name="onedark"> | |
<style name="Text" foreground="#cecece" background="#282c34"/> | |
<style name="Link" foreground="#409090"/> | |
<style name="Selection" foreground="#ffffff" background="#4e4e8f"/> | |
<style name="LineNumber" foreground="#5c6370" background="#2f343f"/> | |
<style name="SearchResult" foreground="#000000" background="#2d4c95"/> | |
<style name="SearchScope" foreground="#000000" background="#f8fafc"/> | |
<style name="Parentheses" foreground="#ffff00" background="#4e4e8f"/> |
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
# set the Windows Update service to "disabled" | |
sc.exe config wuauserv start=disabled | |
# display the status of the service | |
sc.exe query wuauserv | |
# stop the service, in case it is running | |
sc.exe stop wuauserv | |
# display the status again, because we're paranoid |
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
import subprocess | |
get_line_by_line_texlive_dependencies = subprocess.run( | |
[ | |
"apt-cache", | |
"depends", | |
"texlive-full" | |
], | |
universal_newlines=True, | |
stdout=subprocess.PIPE |