This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import os | |
import re | |
import urllib.error | |
import urllib.request | |
AMAZON_SHORTLINK_PATTERN = re.compile(r'https?://amzn.to/[^\?\&\"\)\s]+') | |
AMAZON_URL_PATTERN = re.compile(r'https?://([^\.]+\.)?amazon\.com/[^\)]*tag=[^\")]*[^\?\&\"\)\s]+') | |
AMAZON_SUFFIX_PATTERN = re.compile(r'/ref=.*$') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eux | |
IMG=$1 | |
STARTUP_SCRIPT=$2 | |
MOUNT_POINT=/media/vdesktop | |
#mount stage | |
LOOP="$(sudo losetup -fP --show $IMG)" #create loopback device |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat /etc/nginx/sites-enabled/tinypilot.conf | |
server { | |
listen 80 default_server; | |
server_name tinypilot; | |
root /opt/tinypilot; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |