-
Install rust
jail-app is name of jail.
$ jexec jail-app $ pkg install curl
Download and install rustup
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Most modern HDMI connected devices support Consumer Electronics Control (CEC). It allows devices to send commands to each other, typically to get the TV to switch input and control volume. If you have ever turned on a Game Console and had your TV automatically change input to that device you have seen CEC in action. It is very convenient and useful, sort of a universal remote that works.
Every manufacturer seems to have it’s own branding of CEC (e.g. Samsung Anynet+, LG SimpLink, Sharp Aquos Link) but it may need to be enabled. Check your manual for details.
Using a Raspberry Pi connected to a TV that supports CEC, you can use the command line cec-client
application to control the inputs and the TV itself. These are notes on how to use cec-client
and understand the different options.
import os | |
import json | |
def path_to_dict(path): | |
d = {'name': os.path.basename(path)} | |
if os.path.isdir(path): | |
d['type'] = "directory" | |
d['children'] = [path_to_dict(os.path.join(path,x)) for x in os.listdir\ | |
(path)] | |
else: |
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
- Create other terraform stuff
- tf-backend,
- creds.auto.tfvars with hcloud_token
- ssh key:
mkdir keys; ssh-keygen -f id_rsa
- modify cloudinit.yml:
- change gitlab url
- ADD_YOUR_REGISTRY_TOKEN -> Set to the Gitlab Runner Registration Token
- Add more allowed images/services, if using gitlab registry, like that: registry.myinstance.com/administrators/docker-images/*, change base image etc.
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"path/filepath" | |
"strings" | |
) |
Neovim and Vim both come bundled with a standard plugin called Netrw. Netrw acts a file explorer (similar to NERDTree), but more importantly has the ability to work with scp (as well as sftp, rcp, ftp, and lots of others :h netrw-nread
) to let you edit files and browse directories that are hosted on a remote machine, inside of your local Vim instance.
This is useful since you are able to use your Vim setup and plugins without copying over your dotfiles to the remote machine. As well, since the file is copied to your local machine, there will be no delay when typing.
This is optional for Vim, but required for Neovim (check this Neovim issue explaining why).
I have a workstation behind a VPN at work that I like to remotely access for queuing jobs or data analysis over hosted jupyter notebooks.
Usually I just connect to using the Cisco Anyconnect client but it's caused some headaches.
I want to be able to route to these workstations using the VPN but since they throttle bandwidth use my local gateway for everything else (i.e. looking up docs, streaming spotify etc)