Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -eux
IMG=$1
STARTUP_SCRIPT=$2
MOUNT_POINT=/media/vdesktop
#mount stage
LOOP="$(sudo losetup -fP --show $IMG)" #create loopback device
$ ./quick-install
+ set -e
+ set -u
+ '[' -f /etc/nginx/sites-enabled/KVMPi.conf ']'
++ mktemp -d
+ pushd /tmp/tmp.aBrrPUsUtY
/tmp/tmp.aBrrPUsUtY /tmp/tmp.HoO1q1sCuS
+ sudo apt-get install -y python3-venv
Reading package lists... Done
Building dependency tree
$ cat /etc/nginx/sites-enabled/tinypilot.conf
server {
listen 80 default_server;
server_name tinypilot;
root /opt/tinypilot;
apt-get update && \
apt install curl gnupg2 -y && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
echo 'deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable' >> /etc/apt/sources.list && \
apt-get update && \
apt-get install docker-ce -y
2c2,4
< Effective date: 1 January 2020
---
> Last updated: April 28, 2020
>
> Stripe has updated its Privacy Policy and Cookie Policy effective April 28, 2020. In the Privacy Policy, we have clarified our use of data, including that Stripe does not use, share, rent, or sell the personal data of our users’ customers for interest-based advertising. We’ve also made it clear that in the event of any sale of Stripe or its assets, the buyer will continue to be bound by the terms of the Privacy Policy. We’ve also added more information about the cookies we use in our Cookie Policy.
30c32
< Personal Data is any information that relates to an identified or identifiable individual. The Personal Data that you provide directly to us through our Sites will be apparent from the context in which you provide the data. In particular:
---
> Personal Data is any information that relates to an identified or identifiable individual. The Personal Data that you provide directly to us through our Sites and Services will be apparent
@mtlynch
mtlynch / paste.js
Last active April 5, 2020 04:19 — forked from nickytonline/paste.js
Simulate a paste event in Cypress
/**
* Simulates a paste event.
*
* @param pasteOptions Set of options for a simulated paste event.
* @param pasteOptions.destinationSelector Selector representing the DOM element that the paste event should be dispatched to.
* @param pasteOptions.pastePayload Simulated data that is on the clipboard.
* @param pasteOptions.pasteType The format of the simulated paste payload. Default value is 'text'.
*/
function paste({ destinationSelector, pastePayload, pasteType = 'text' }) {
// https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event
@mtlynch
mtlynch / Dockerfile
Last active November 7, 2019 20:29
Dockerfile to create a Sia container
FROM debian:jessie-slim
ENV SIA_VERSION 1.3.0
ENV SIA_PACKAGE Sia-v$SIA_VERSION-linux-amd64
ENV SIA_ZIP ${SIA_PACKAGE}.zip
# Choose a binary release of Sia.
ENV SIA_RELEASE https://github.com/NebulousLabs/Sia/releases/download/v$SIA_VERSION/$SIA_ZIP
# Choose the directory within the container where Docker will place Sia.
ENV SIA_DIR /opt/$SIA_PACKAGE
@mtlynch
mtlynch / dump-background-images.js
Last active August 2, 2019 02:45
Dump background-image property from every element on a page
function getBackgroundUrl(bg) {
var match = bg.match(/url\(["']([^'"]+)['"]\)/);
if (match && match.length == 2) { return match[1]; }
return null;
}
backgroundUrls = new Set();
document.querySelectorAll('*')
.forEach(function(el) {
var background = el.style.background || window.getComputedStyle(el).background;
mike@ketohub:~/snorkel.deploy$ virtualenv -p python2 dev
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/mike/snorkel.deploy/dev/bin/python2
Also creating executable in /home/mike/snorkel.deploy/dev/bin/python
Installing setuptools, pip, wheel...
done.
mike@ketohub:~/snorkel.deploy$ source dev/bin/activate
(dev) mike@ketohub:~/snorkel.deploy$ pip install snorkel-lite
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting snorkel-lite