To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT
- Get PAT (personal access token)
Personal Settings > Developer settings > Personal access tokens
class IndexedDBStorage { | |
constructor(dbName = 'localStorageDB', storeName = 'localStorageStore') { | |
this.dbName = dbName; | |
this.storeName = storeName; | |
this._init(); | |
this.cache = {}; | |
} | |
_init() { | |
const request = window.indexedDB.open(this.dbName, 1); |
// this is the background code... | |
// listen for our browerAction to be clicked | |
chrome.browserAction.onClicked.addListener(function (tab) { | |
// for the current tab, inject the "inject.js" file & execute it | |
chrome.tabs.executeScript(tab.ib, { | |
file: 'inject.js' | |
}); | |
}); |
# Setup QEMU for x86-64 Docker images on Raspberry Pi 4 | |
# Install Python3 and Docker first: https://dev.to/rohansawant/installing-docker-and-docker-compose-on-the-raspberry-pi-in-5-simple-steps-3mgl | |
# Install QUEMU (https://www.qemu.org/) | |
sudo apt-get install qemu binfmt-support qemu-user-static | |
# Use QUS in Docker (https://github.com/dbhi/qus) to configure x86_64 architecture | |
docker run --rm --privileged aptman/qus -s -- -p x86_64 | |
# Test x86-64 image: |
To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT
Personal Settings > Developer settings > Personal access tokens
FROM ubuntu | |
RUN apt-get update -y \ | |
&& apt-get install -y wget \ | |
&& wget -O netselect.deb http://http.us.debian.org/debian/pool/main/n/netselect/netselect_0.3.ds1-28+b1_`dpkg --print-architecture`.deb \ | |
&& dpkg -i netselect.deb \ | |
&& rm netselect.deb \ | |
&& sed -r -i -e "s#http://(archive|security)\.ubuntu\.com/ubuntu/?#$(netselect -v -s1 -t20 `wget -q -O- https://launchpad.net/ubuntu/+archivemirrors | grep -P -B8 "statusUP|statusSIX" | grep -o -P "http://[^\"]*"`|grep -P -o 'http://.+$')#g" /etc/apt/sources.list |
function mySlowFunction(baseNumber) { | |
console.time('mySlowFunction'); | |
let result = 0; | |
for (var i = Math.pow(baseNumber, 7); i >= 0; i--) { | |
result += Math.atan(i) * Math.tan(i); | |
}; | |
console.timeEnd('mySlowFunction'); | |
} | |
mySlowFunction(8); // higher number => more iterations => slower |
#accepts all arguments for ssh except command, -N and -f | |
#command can be piped in | |
Filter ssh-f { | |
$N = $False | |
if (!$_) { | |
#the same as -N | |
$_ = 'read' | |
$N = $True | |
} | |
$_ = 'echo SUCCESS;' + $_ |
Mount the remote volume through whatever means. Example, sshfs
:
sshfs -o allow_other,defer_permissions,IdentityFile=~/.ssh/id_rsa <remote_user>@host:/path/to/mount /path/to/mount
Stop the machine and add the new shared folder to the VirtualBox config.
docker-machine stop
KEYMAPOPTS="us us" | |
HOSTNAMEOPTS="-n alpine" | |
INTERFACESOPTS="auto lo | |
iface lo inet loopback | |
auto eth0 | |
iface eth0 inet dhcp | |
hostname alpine | |
" | |
TIMEZONEOPTS="-z UTC" |