brew install gnupg21, pinentry-mac
(this includes gpg-agent and pinentry)- Generate a key:
$ gpg --gen-key
- Take the defaults. Whatevs
- Tell gpg-agent to use pinentry-mac:
$ vim ~/.gnupg/gpg-agent.conf
brew install gnupg21, pinentry-mac
(this includes gpg-agent and pinentry)$ gpg --gen-key
$ vim ~/.gnupg/gpg-agent.conf
"use strict"; | |
const { addObserver, notifyObservers } = Cc["@mozilla.org/observer-service;1"]. | |
getService(Ci.nsIObserverService); | |
const { getEnumerator } = Cc["@mozilla.org/appshell/window-mediator;1"]. | |
getService(Ci.nsIWindowMediator); | |
const isBrowser = window => { | |
try { | |
return window.document.documentElement.getAttribute("windowtype") === "navigator:browser"; |
1) ipfs --upgrade-cidv0-in-output=true add --chunker=rabin-262141 --trickle=false --raw-leaves=false --cid-version=0 ../testdata/large_repeat_1GiB.zst | |
2) ipfs add --chunker=rabin-262141 --trickle=false --raw-leaves=false --cid-version=1 ../testdata/large_repeat_1GiB.zst | |
3) ipfs --upgrade-cidv0-in-output=true add --chunker=rabin-262141 --trickle=false --raw-leaves=true --cid-version=0 ../testdata/large_repeat_1GiB.zst | |
4) ipfs add --chunker=rabin-262141 --trickle=false --raw-leaves=true --cid-version=1 ../testdata/large_repeat_1GiB.zst | |
5) ipfs --upgrade-cidv0-in-output=true add --chunker=size-65535 --trickle=true --raw-leaves=false --cid-version=0 ../testdata/large_repeat_1GiB.zst | |
6) ipfs add --chunker=size-65535 --trickle=true --raw-leaves=false --cid-version=1 ../testdata/large_repeat_1GiB.zst | |
7) jsipfs add --chunker=size-65535 --trickle=true --raw-leaves=false --cid-version=1 ../testdata/large_repeat_1GiB.zst | |
8) ipfs --upgrade-cidv0-in-output=true add --chunker=size-262144 --trickle=true --raw-leaves=false - |
import type { CID } from 'multiformats' | |
/** | |
* Logical representation of a raw chunk of a file. | |
* | |
* TODO: Clarify when represenation is used instead of `FileChunk` | |
* representation. | |
*/ | |
export interface Raw extends PBNode { | |
Data: ByteView<{ |
import type { CID} from "multiformats" | |
import { Mtime } from "ipfs-unixfs" | |
export interface Lib { | |
/** | |
* Creates a directory importer that can be used to build up directory of | |
* files. It takes an optional queuing strategy parameter that can be used | |
* to specify how how many blocks can be queue internally before backpressure | |
* is applied and writer is blocked. This allows users to specify how much |
import { loop, recur } from './loop.js' | |
export const factorial = (n) => loop((n, acc) => n <= 1 ? acc : recur(n - 1, n * acc), n, 1) |
// Lack of tail call optimization in JS | |
var sum = function(x, y) { | |
return y > 0 ? sum(x + 1, y - 1) : | |
y < 0 ? sum(x - 1, y + 1) : | |
x | |
} | |
sum(20, 100000) // => RangeError: Maximum call stack size exceeded | |
// Using workaround |
// Utility function for detecting generators. | |
let isGenerator = x => { | |
return Function.isGenerator && | |
Function.isGenerator.call(x) | |
} | |
// Data type represents channel into which values | |
// can be `put`, or `received` from. Channel is | |
// very much like queue where reads and writes are | |
// synchronized via continuation passing. |
module Focus exposing (Model, init, update, onFocus, onBlur, focus, blur) where | |
import Ref | |
import Native.Focus | |
import Html | |
import Html.Attributes | |
import Html.Events | |
type alias Model = | |
{ ref: Ref.Ref |
Code here takes a DOM Selection Range instance and starts traversing a DOM starting from startContainer
up to endContainer
and wraps Text
elements with elements that have semi-transparent background & swaps img
elements with clones that are styled to have semi-transparent yellow overlay.