Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am qntmpkts on github.
  • I am qntmpkts (https://keybase.io/qntmpkts) on keybase.
  • I have a public key whose fingerprint is 514F 76EA 6DE6 6522 B0E9 D2F9 7C64 CE30 F59B 6260

To claim this, I am signing this object:

@qntmpkts
qntmpkts / crd.service
Created August 29, 2016 02:19
crd.service for daemonizing chrome-remote-desktop with systemd
[Unit]
Description="Chrome Remote Desktop host daemon"
[Service]
ExecStart=/usr/bin/crd --start
ExecStop=/usr/bin/crd --stop
ExecReload=/usr/bin/crd --reload
Restart=always
TimeoutStopSec=10
@qntmpkts
qntmpkts / install.sh
Last active April 13, 2022 09:07
Installer for oh-my-zsh on Termux
main() {
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
if which tput >/dev/null 2>&1; then
ncolors=$(tput colors)
fi
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
RED="$(tput setaf 1)"
GREEN="$(tput setaf 2)"
YELLOW="$(tput setaf 3)"
pkg install python python-dev libjpeg-turbo-dev libcrypt-dev ndk-sysroot clang
LDFLAGS="-L/system/lib/" CFLAGS="-I/data/data/com.termux/files/usr/include/" pip install wheel pillow
pip install rainbowstream
@qntmpkts
qntmpkts / ssh-agent.plugin.zsh
Created December 30, 2016 03:48
ssh-agent oh-my-zsh plugin for termux
typeset _agent_forwarding _ssh_env_cache
function _clear_agent() {
rx="^ssh-"
tmp="/data/data/com.termux/files/usr/tmp"
_ssh_env_cache="$HOME/.ssh/environment-$SHORT_HOST"
. $_ssh_env_cache > /dev/null
SSH_CHECK_AGENT_PID=$(ps x | grep ssh-agent | grep -v "grep " | awk '{print $1}')
if [[ -z $SSH_CHECK_AGENT_PID || $SSH_CHECK_AGENT_PID != $SSH_AGENT_PID ]]; then
if [[ -e $_ssh_env_cache ]]; then
@qntmpkts
qntmpkts / .zshrc-termux
Created December 30, 2016 04:51
.zshrc for termux
[[ -z $OS ]] && export OS=$(uname -a | awk '{print $(NF)}')
export ZSH=/data/data/com.termux/files/home/.oh-my-zsh
ZSH_THEME="robbyrussell"
plugins=(git ssh-agent)
source $ZSH/oh-my-zsh.sh
@qntmpkts
qntmpkts / sysctl.conf
Created December 31, 2016 21:40
Hardened /etc/sysctl.conf settings
# IP Spoofing protection
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
# Ignore ICMP broadcast requests
net.ipv4.icmp_echo_ignore_broadcasts = 1
# Disable source packet routing
net.ipv4.conf.all.accept_source_route = 0
net.ipv6.conf.all.accept_source_route = 0
This file has been truncated, but you can view the full file.
#!/usr/bin/env python
#
# Hi There!
# You may be wondering what this giant blob of binary data here is, you might
# even be worried that we're up to something nefarious (good for you for being
# paranoid!). This is a base85 encoding of a zip file, this zip file contains
# an entire copy of pip.
#
# Pip is a thing that installs packages, pip itself is a package that someone
# might want to install, especially if they're looking to run this get-pip.py
@qntmpkts
qntmpkts / ds
Created January 7, 2017 23:30
Place this in your path to reliably launch any program from terminal into the background
#!/usr/bin/env sh
if test -t 1; then
exec 1>/dev/null
fi;
if test -t 2; then
exec 2>/dev/null
fi;
@qntmpkts
qntmpkts / install-keybase.sh
Last active August 15, 2017 01:04
Install Keybase inside a ChromeOS Crouton Chroot
#!/usr/bin/env sh
_install() {
curl -O https://prerelease.keybase.io/keybase_amd64.deb ~/Downloads/keybase_amd64.deb
sudo enter-chroot -n xenial sudo -S sh -c "sudo dpkg -i ~/Downloads/keybase_amd64.deb && sudo apt-get install -f"
}
_install