A host-only network interface is created virtually in software which appears to the host system.
This interface can be attached to one or more VMs, allowing connectivity between those VMs and communication between the host system and VMs.
The Huawei B315 modem supplied by Optus for the (now defunt) Vividwireless service is a workable but sadly rather crippled device, even down to the inability to modify assigned DNS servers from it's DHCP server away from Optus DNS to something sane (Google DNS/Cloudflare/etc.).
This script should allow for the easy update of assigned DNS servers and has been tested with Google Chrome.
- Log into router web UI (e.g.
http://192.168.0.1
). - From the same browser session, open the "web developer tools" pane.
Since November 2018, GitHub have started to display forced push events to pull request page timelines. This bookmarklet will toggle display of these events if they are getting in the way of meaningful commits.
Add the code below as the URL of a new bookmark:
javascript:((d)=>{if(d.getElementById('nuke-fp')==null){let e=d.createElement('style');e.id='nuke-fp';e.innerHTML='.nuke-fp{display:none}';d.getElementsByTagName('head')[0].appendChild(e)}for(let e of Array.from(d.querySelectorAll('.discussion-timeline .discussion-item-head_ref_force_pushed'))){e.classList.toggle('nuke-fp')}})(document)
Tested with Chrome 70.0.3538.102.
'use strict'; | |
async function* delayList() { | |
function delay(timeout) { | |
return new Promise((resolve,reject) => { | |
setTimeout(() => resolve(`dealyed for: ${timeout}ms`),timeout); | |
}); |
Python function to determine if a given IPv4 CIDR fits into another.
How cidr_fit(cidr_a,cidr_b)
works:
- For both CIDR's given:
- Splits each CIDR into address and prefix size parts.
- Converts the address part to a 32 bit binary string.
- Example:
192.168.0.1
becomes11000000101010000000000000000001
.
- Example:
A Google Apps Script which adds pseudo message retention-like policies against specific labels for a Gmail account.
- Apps Script function is called automatically on a regular schedule.
- Script iterates over a set of predefined message labels.
Create a new systemd user unit, which starts ssh-agent
upon login to server. Will remain resident until the final session for the user has logged out.
-
Create
/etc/systemd/user/ssh-agent.service
. -
Run the following commands (under your user account, not
root
) to install the systemd unit and start:
When using the shift
built-in, have noted this interesting behavior which I have been unable to find documentation for.
Update: the answer was right in front of me, if shift
is called with a value greater than arguments available in $1 - $x
then it will return with a non zero status - hence the script will halt (since I'm using set -e
)!
Using the script test.sh
, executed using arguments:
./test.sh apple orange banana
apple