You are here |
techtldr.com | ||
| | | |
grosser.it
|
|
| | | | No more going into the file and deleting the entry manually. To remove line 123 from ~/.ssh/known_hosts: Usage rmknownhost 123 Code Put this it into a file called rmknownhost inside a folder that is in your PATH and chmod +x the file. #! /usr/bin/env ruby line = ARGV[0] || raise("gimme line to remove") hosts =... | |
| | | |
willhaley.com
|
|
| | | | See here an example of a custom Linux mount script, written in Python, that can be used to mount disks with /etc/fstab. The mount script is installed at /usr/bin/mount.my-command and is executable. #!/usr/bin/env python3 import sys import subprocess device = sys.argv[1] mount_point = sys.argv[2] options = sys.argv[4] # Any customization could be done here to the `mount` command that is run. mount_command = ['mount', '-o', options, device, mount_point] output = subprocess.run( mount_command, capture_output=True ) if output.returncode != 0: print("error mounting") print(output.stderr.decode('UTF-8')) sys.exit(output.returncode) See here how the custom script can then be used in /etc/fstab like any "normal" mount. | |
| | | |
www.henryleach.com
|
|
| | | | I'm leaving a note here as I've had this problem occur a couple of times, and each time it confuses me. When I try and launch a Vagrant box with an Ansible provisioning step, or otherwise try to run an Ansible playbook I get the error: ImportError: cannot import name 'initialize_locale'. Even a simple ansible --version will trigger this error. | |
| | | |
enterprisecraftsmanship.com
|
|
| | My new online training course about Encapsulating EF Core Usagewent live. |