Skip to content

Instantly share code, notes, and snippets.

@ajgappmark
ajgappmark / xclip aliases for startup scripts
Created June 7, 2021 12:27 — forked from yiboyang/xclip aliases for startup scripts
A few xclip aliases to simplify copying/pasting
# 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:
@ajgappmark
ajgappmark / cloudflare-ddns-update.sh
Created October 6, 2021 14:08 — forked from Tras2/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/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
@ajgappmark
ajgappmark / LTJ320AP02-J.svg
Created April 3, 2022 16:22 — forked from X3msnake/LTJ320AP02-J.svg
SAMSUNG UE32D4003BW LTJ320AP02-J - 30pin LVDS connector diagram pinout
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ajgappmark
ajgappmark / README.md
Created April 11, 2022 16:20 — forked from heyarne/README.md
Interacting with your Firefox bookmarks and history from the command line

Firefox History and Bookmark Command Line Interface

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.

What Does It Look Like?

asciicast

@ajgappmark
ajgappmark / hash.sh
Created April 17, 2022 14:02 — forked from chaitu87/hash.sh
Hashpass shell script with xclip to copy password to clipboard
#!/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 \
@ajgappmark
ajgappmark / textlive-full-beefless.md
Created August 26, 2022 17:25 — forked from wkrea/textlive-full-beefless.md
`texlive-full` without the beef

TLDR;

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.:

@ajgappmark
ajgappmark / textlive-full-beefless.md
Created August 26, 2022 17:26 — forked from shivams/textlive-full-beefless.md
`texlive-full` without the beef

TLDR;

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.:

#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"/>
@ajgappmark
ajgappmark / disable-windows-update.ps1
Created September 11, 2022 19:19 — forked from mikebranstein/disable-windows-update.ps1
Disables Windows Update with PowerShell
# 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
@ajgappmark
ajgappmark / install-texlive-without-docs.py
Created January 24, 2023 08:36 — forked from briandk/install-texlive-without-docs.py
Instal a full latex texlive on Ubuntu Xenial without any of the docs
import subprocess
get_line_by_line_texlive_dependencies = subprocess.run(
[
"apt-cache",
"depends",
"texlive-full"
],
universal_newlines=True,
stdout=subprocess.PIPE