Skip to content

Instantly share code, notes, and snippets.

@ammgws
ammgws / tmux.md
Created July 29, 2016 13:47 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@ammgws
ammgws / speedtests_newclass_final.py
Last active January 4, 2017 08:17
markovify model export benchmarks
import markovify
# modified markovify Text class
class EditedTextClass(markovify.Text):
def __init__(self, input_text, state_size=2, chain=None, runs=None):
"""
input_text: A string.
state_size: An integer, indicating the number of words in the model's state.
chain: A trained markovify.Chain instance for this text, if pre-processed.
@ammgws
ammgws / antergos_setup_hints.md
Last active March 20, 2017 05:09
Arch (antergos) installation

Replace default package manager

yaourt -S pamac-pacaur
sudo pacman -R yaourt
  • pacman is the system default package manager (CLI)
  • yaourt is a wrapper for pacman that adds more functionality (CLI)
  • pamac is a GUI for pacman
  • pacaur is a helper tool for AUR (Arch User Repository)
  • pamac-pacaur is a GUI that will use pacaur instead of yaourt
@ammgws
ammgws / antergos_japaneseIME.md
Last active March 22, 2017 16:32
notes on setting up Japanese IME in antergos 17.3
  1. Install using pacman -S or pamac-manager:
adobe-source-han-sans-jp-fonts
mozc
uim-mozc
  1. Add to ~/.xprofile, ~/.xinitrc or ~/.xsession:
    Note: uim-toolbar-gtk3-systray displays on Cinnamon but not with GNOME3
    for GNOME3 have to use the floating menu uim-toolbar-gtk3
@ammgws
ammgws / logitech_g110_instructions.md
Last active August 15, 2021 06:11
getting logitech g110 to work in arch linux

Packages to install from system repo / AUR

sudo pacman -S python2-gconf from AUR: python2-rsvg

Create python2.7 virtualenv to use with gnome15 and install requirements with pip

vf new -p python2.7 gnome15_venv
vf globalpackages  # to allow system packages installed above to be used in this venv
@ammgws
ammgws / logitech_g110_instructions_2.md
Last active August 25, 2017 09:12
logitech g110 on archlinux - try2

download patched files for G110

cd /tmp
git clone https://github.com/Leproide/Linux-G15-Daemon-Logitech-G110-.git
cd Linux-G15-Daemon-Logitech-G110--master

install patched libusb

cd libusb1-1.4.1
@ammgws
ammgws / fork_nongithub_repo.md
Created March 27, 2017 15:01
how to fork a nongithub repo
  • Create a new, empty repository on GitHub

  • Clone the created repository
    git clone https://github.com/username/repository.git

  • Fetch the contents of the original repository

cd repository
git remote add upstream git://url.com/remote_repository.git
git fetch upstream
git merge upstream/master

Setup PGP

~/.gnupg/gpg.conf use SHA512 over default SHA256

personal-digest-preferences SHA512
cert-digest-algo SHA512
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
personal-cipher-preferences TWOFISH CAMELLIA256 AES 3DES
@ammgws
ammgws / ssh_x11fowarding_solve_badaccess_error
Last active July 19, 2017 13:06
BadAccess error with ssh X11fowarding
solution: logout and ssh back in with the -Y flag as well
ssh -XY yip@yarp
"-Y Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls.”
@ammgws
ammgws / htpc_setup_notes.md
Last active January 19, 2018 13:53
Notes on how I setup HTPC for future reference

1. Preparation / OS Install

  • Create liveusb using Ubuntu mini.iso dd bs=4M if=/home/user/Downloads/mini.iso of=/dev/sdf status=progress; and sync in fish shell

  • During install will be prompted for what to install: choose xubuntu minimal and openssh server

  • This time left just one disk (8TB) in the case, and used LVM when partitioning: root given 15gb, data partition given the rest (set recovery-blocks to 1% and inode to largest size since this is just a media partition)

2. Creating a user with limited privileges for Kodi