Skip to content

Instantly share code, notes, and snippets.

@keepitsimple
keepitsimple / zsh-keyboard-shortucts.md
Created March 10, 2025 15:30 — forked from mkfares/zsh-keyboard-shortucts.md
Common zsh Keyboard Shortcuts on macOS Catalina

Common zsh Keyboard Shortcuts on macOS

Navigation

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

@keepitsimple
keepitsimple / got-download-stream.js
Created October 6, 2022 13:40 — forked from tsmx/got-download-stream.js
Stream-download a file with filename from response header (content-disposition) via got package.
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 => {
@keepitsimple
keepitsimple / download.js
Last active March 6, 2021 15:33 — forked from falkolab/download.js
Download file by http with progress (ES6, promises, NodeJS 12.x)
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) {
@keepitsimple
keepitsimple / index.html
Created April 16, 2020 12:58 — forked from kkm/index.html
Chrome MediaRecorder in H264
<!DOCTYPE html>
<head>
<script>
var recordedChunks = [];
var constraints = {
audio: true,
video: true
};
var mediaRecorder = null;
@keepitsimple
keepitsimple / piterjs_conf_irustm.md
Created January 18, 2020 20:08 — forked from irustm/piterjs_conf_irustm.md
Прототипы приложений на современных технологиях
@keepitsimple
keepitsimple / tutorial.md
Created August 7, 2018 11:45 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API

Tutorial: Designing a GraphQL API

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.

@keepitsimple
keepitsimple / resize.sh
Created January 11, 2017 14:12 — forked from mifix/resize.sh
LXD - ZFS - resize
# 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