CTRL + A
: Move the cursor to the beginning of the line
CTRL + E
: Move the cursor to the end of the line
OPTION + Left Arrow
: Move the cursor one word backward
OPTION + Right arrow
: Move the cursor one word forward
Left Arrow
: Move the cursor one character backward
Right Arrow
: Move the cursor one character forward
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
const got = require('got'); | |
const stream = require('stream'); | |
const fs = require('fs'); | |
const { promisify } = require('util'); | |
const pipeline = promisify(stream.pipeline); | |
// instantiate the download stream - use options to set authorization header etc. if needed | |
let downStream = got.stream('https://example.com/download'); | |
downStream.on('response', response => { |
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
import fs from 'fs' | |
import http from 'http' | |
import { basename } from 'path' | |
import { URL } from 'url' | |
const TIMEOUT = 10000 | |
export default function (url, path) { | |
const uri = new URL(url) | |
if (!path) { |
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
<!DOCTYPE html> | |
<head> | |
<script> | |
var recordedChunks = []; | |
var constraints = { | |
audio: true, | |
video: true | |
}; | |
var mediaRecorder = null; |
This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.
It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.
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
# make sure zfs autoexpand is enabled (only needed once) | |
sudo zpool set autoexpand=on lxd | |
sudo truncate -s 50G /var/lib/lxd/zfs.img | |
# Make zfs realize the fact that partition has been changed and make zpool | |
# use the new partition which is actually the same one | |
sudo zpool online -e lxd /var/lib/lxd/zfs.img /var/lib/lxd/zfs.img |