Skip to content

Instantly share code, notes, and snippets.

View solaris9000's full-sized avatar

Solaris9000 solaris9000

View GitHub Profile
@solaris9000
solaris9000 / vim_tmux_no_X_clipboard.vim
Created February 8, 2022 21:05 — forked from TroyFletcher/vim_tmux_no_X_clipboard.vim
Sharing clipboards between vim and tmux without xsel or xclip or X forwarding
" Share clipboards between vim and tmux without xsel or xclip (which require X and
" X forwarding with SSH) and without changing tmux shortcuts. Requires only tail.
"
" Great for an ssh session to you linode or droplet.
"
" Uses z buffer in vim and writes output to ~/.clipboard and then to tmux's paste
" buffer, and reads it back in cleanly for putting (puddin').
"
" NOTE: tmux has an undocumented command limit! https://github.com/tmux/tmux/issues/254
" this means if you mean to copy larger bits of code (entire functions) tmux will
@solaris9000
solaris9000 / auto_fs_pi.txt
Created June 21, 2019 10:09
How to set up auto filesystem expansion for custom PI images
How to set up auto filesystem expansion for custom PI images
============================================================
Preamble
========
When a custom pi image is created, it is a good idea to expand the FS so that all the space on the SD card is used. This is done manaully using the raspi-config tool or raspi-config --expand-rootfs.
The official pi images expand the FS automatically so it would be nice to replicate this process for custom images.
The procedure below shows how to do this.
Procedure
@solaris9000
solaris9000 / Resize_Images_in_ImageMagick.txt
Created June 11, 2019 19:50
Using ImageMagik to resize photos
Using ImageMagik to resize photos
---------------------------------
Pre-Reqs
--------
Imagemagick is installed and in the system PATH
https://www.imagemagick.org/
Procedure
---------
@solaris9000
solaris9000 / Using_Exiftool.txt
Created June 11, 2019 19:49
How to strip all EXIF data for upload to Web using Exiftool
How to strip all EXIF data for upload to Web using Exiftool
Pre-Reqs
--------
Exiftool has been installed (single exe)
Rename orig exiftool(-k).exe to exiftool.exe
Exiftool is in system path for ease of use
Procedure
---------
@solaris9000
solaris9000 / print_server_rpi.txt
Created February 16, 2019 15:28
Setting up print server on Raspberry Pi
----- Setting up PRINT SERVER AKA Airprint on RPI -----
=======================================================
This guide will set up a CUPS based print server on the RPI3 with a USB printer attached.
Some older USB printers do not have wifi or ethernet so if you want to make a printer accessible via your phone or laptop
this is one way to do it.
Pre-Reqs
========
RPI3 for speed with at least 8GB Micro SD card
@solaris9000
solaris9000 / ANSI_Colours.txt
Last active July 5, 2024 16:18
Default ANSI Colours for MobaXterm and Putty
The default ANSI colours are much nicer in MobaXterm (imho) as I find the putty colours a little too dark.
To replicate MobaXterm colours in putty here are the RGB settings.
The default putty ANSI colours are here in case you want to revert back ;)
My preferred font is consolas 9pt cleartype.
MobaXterm Default ANSI Colours
------------------------------
Black 0 0 0
Bold Black 54 54 54
@solaris9000
solaris9000 / vagrantbox.txt
Last active January 23, 2019 19:03
How to create a Vagrant box simply.
How to make and install a vagrant base box from scratch using VirtualBox only for CentOS7.
Some info from: https://www.skoblenick.com/vagrant/creating-a-custom-box-from-scratch/
Pre-Reqs
VirtualBox, VirtualBox Extensions, Vagrant for Windows, ISO of CentOS7
Directory structure to store all VM's and Vagrant boxes. Eg D:\VM
1. Set up a new VM (dont use spaces in the name) in the usual way with these settings via the GUI:
@solaris9000
solaris9000 / pexpect_for_RHEL7.txt
Last active March 9, 2018 14:46
How to install latest pexpect for RHEL7 manually for use in Ansible
How to install pexpect on RHEL7 for Ansible purposes
1. Download the sources for pexpect-4.4.0 and ptyprocess-0.5.2
here:
https://pypi.python.org/pypi/pexpect
https://pypi.python.org/pypi/ptyprocess
2. Extract the tarballs
3. Goto dir for ptyprocess and type:
@solaris9000
solaris9000 / vagrantbasebox.txt
Last active February 7, 2018 07:53
How to create Vagrant box from scratch
How to install a vagrant base box from scratch using VirtualBox only for CentOS7 by Solaris9000
Some info from: https://www.skoblenick.com/vagrant/creating-a-custom-box-from-scratch/
Pre-Reqs
VirtualBox for Windows, VirtualBox Extensions, Vagrant for Windows, ISO of CentOS7
Directory structure to store all VM's and Vagrant boxes. Eg D:\VM
1. Set up a new VM (dont use spaces in the name) in the usual way ie with GUI, with these settings: