Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Doug A DougAnderson444

🏠
Working from home
View GitHub Profile
@tplooker
tplooker / did-github-proof.jsonld
Created Nov 21, 2020
DID to Github Account Linkage Proof
View did-github-proof.jsonld
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
{
"sameAs": "https://www.w3.org/TR/owl-ref/#sameAs-def"
}
],
"issuer": "did:key:z6MkkWRMquVJsLaqsD45TYzhhDRJWJGDBx8jUkFGt6zvLc3R",
"issuanceDate": "2020-11-21T10:02:39.501Z",
"type": [
@peterVG
peterVG / ipfs-on-raspberry-pi.md
Last active Jun 12, 2021
Put IPFS decentralized storage on your Raspberry Pi with USB storage
View ipfs-on-raspberry-pi.md

I put IPFS on a Raspberry Pi and so should you!

Total cost of joining the decentralized storage revolution with your own lo-fi node: $124 USD

raspberry-ipfs

@andelf
andelf / main.rs
Created May 14, 2020
Embed Deno in Rust
View main.rs
use deno_core::Op;
use deno_core::ZeroCopyBuf;
use deno_core::{CoreIsolate, StartupData};
use std::str;
fn main() {
println!("v8 version: {}", deno_core::v8_version());
let mut isolate = CoreIsolate::new(StartupData::None, false);
@andrewosh
andrewosh / README.md
Created May 11, 2020
A smal,l end-to-end example of using Hyperdrive/Hyperswarm to replicate a drive
View README.md

Note: To keep this even smaller, we're using a small helper module called the hyperswarm replicator, which wraps a few Hyperswarm setup details.

View container.c
#define _GNU_SOURCE
#include <errno.h>
#include <sched.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
@ow
ow / Chromium flags for PWAs.md
Last active Jan 27, 2021
Chromium flags for PWAs
View Chromium flags for PWAs.md

Upcoming flags to enable link capturing and other PWA features. Enable these flags by copying and pasting the following, then searching for the below chrome://flags/

Enable full desktop integration:
chrome://flags/#enable-desktop-pwas

Capture URLs in their scope, such as twitter URLs for the Twitter PWA:
chrome://flags/#enable-desktop-pwas-link-capturing chrome://flags/#enable-desktop-pwas-stay-in-window

Get a pop-up that offers to allow the PWA to open certain URLs:

@ralfr
ralfr / iota_zmq.js
Created Jan 11, 2018
IOTA ZeroMQ Snippet
View iota_zmq.js
const zmq = require('zeromq')
const config = require('./config')
var sock = zmq.socket('sub')
sock.connect('tcp://' + config.zmq_url)
sock.subscribe('')
sock.on('message', function(topic) {
@gliheng
gliheng / .cargo|config
Last active Jan 20, 2021
export rust function to javascript using cwrap
View .cargo|config
[target.wasm32-unknown-emscripten]
rustflags = [
"-Clink-args=-s EXPORTED_FUNCTIONS=['_draw'] -s ASSERTIONS=1",
]
@ncochard
ncochard / babel-webpack.md
Last active Jun 11, 2021
The correct way to compile ES6 using babel...
View babel-webpack.md

When you create a npm package, remember it might be used in a browser or a server, or even a command line utility… For each package you create, please pay attention at what it will be used for:

  1. Is it going to be used as a dependency to a nodejs application that is not bundled? (e.g. command line utilities)
  2. Is it going to be used as a dependency to a nodejs application that is bundled? (e.g. AWS Lambdas)
  3. Is it going to be used as a dependency to a browser application (always bundled)?.
  • In cases 2) and 3) you want to allow for tree shaking.
  • In cases 1) and 2) you want to benefit from the "ES6"/"ES next" features supported natively by nodejs.
  • In case 3) you also want to benefit from the native support of "ES6" from your browser.
@subfuzion
subfuzion / curl.md
Last active Jun 21, 2021
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.