Skip to content

Instantly share code, notes, and snippets.

Avatar
🥃
Check out SHER: https://sher.app 🎙️

Diego dpaez

🥃
Check out SHER: https://sher.app 🎙️
View GitHub Profile
@dpaez
dpaez / drive-client.js
Created Oct 30, 2020
hyperdrive full download gist
View drive-client.js
const { join } = require('path')
const Hyperdrive = require('@geut/hyperdrive-promise')
const Networker = require('@corestore/networker')
const Corestore = require('corestore')
const raf = require('random-access-file')
const { once } = require('events')
const tempy = require('tempy')
const externalKey = process.argv[2]
View consumer.js
const P2PCommons = require('@p2pcommons/sdk-js')
const tempy = require('tempy'))
const baseDir = tempy.directory()
console.log(`baseDir is: ${baseDir}`)
const commons = new P2PCommons({ verbose: true, baseDir })
process.once('SIGINT', () => commons.destroy())
View keybase.md

Keybase proof

I hereby claim:

  • I am dpaez on github.
  • I am carax (https://keybase.io/carax) on keybase.
  • I have a public key ASBTYeB2azqpGbUsWMgFQWiIyo0SuoRaHtRgOPvdPtjhQAo

To claim this, I am signing this object:

@dpaez
dpaez / pruneBranches.sh
Created Mar 11, 2020
Handy method for keeping your branches clean (source: https://devconnected.com/how-to-clean-up-git-branches/)
View pruneBranches.sh
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d`
@dpaez
dpaez / contentCreation.js
Created Dec 3, 2019
p2pcommons: sdk-js: content creation and seeding small example
View contentCreation.js
const P2PCommons = require('.') // liberate science constructor function
const tempy = require('tempy')
const commons = new P2PCommons({ baseDir: tempy.directory(), verbose: true })
process.once('SIGINT', () => commons.destroy())
;(async () => {
await commons.ready()
// create some content
const { rawJSON, metadata } = await commons.init({
type: 'content',
@dpaez
dpaez / post.draft.md
Last active Feb 27, 2018
dk writing a blog post about choo and composing choo apps? choo apps as plugins? wat?
View post.draft.md

Componiendo choo apps.

TLDR

En este articulo vamos a ver los conceptos de composición y plugin. Vamos a relacionarlos usando el framework Choo teniendo como objetivo la creación de un componente nuevo que otrxs tal vez pueden usar.

Intro

Choo es un framework para construir aplicaciones web (otro mas 😁), que tiene como objetivo simplificar el desarrollo e incluso hacerlo divertido. Esto lo podemos ver reflejado en su filosofia [Ref: Choo#Philosophy]. Pero ¿Cómo logra choo simplificar este proceso? Bueno, alguna de las estrategias que Yoshua Wuyts (autor, desarrollador principal) y colaboradores eligen son: mantener una base de código pequeña (1 solo archivo, con dependencias por supuesto), apoyarse en un sistema de eventos y mantener una superficie de API reducida. Pero estas son tan solo algunas características, si desean conocer mas sobre choo hace un tiempo dí una charla llamada: [Choo, el pequeño fram

@dpaez
dpaez / notes-links.md
Created Mar 9, 2017
To be used on concurrency notes/post:
View notes-links.md
View .bash_profile
export CLICOLOR=1
# Set colors to match iTerm2 Terminal Colors
export TERM=xterm-256color
export NVM_DIR="/Users/deka/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
source ~/.git-completion.bash
@dpaez
dpaez / .vimrc
Last active Feb 16, 2017 — forked from tinchoz49/.vimrc
dk's 🆒 vim config :neckbeard:
View .vimrc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer:
" deka
" Based on the Awesome vimrc project by Amir Salihefendic
" https://github.com/amix/vimrc
"
" Sections:
" -> General
" -> VIM user interface
" -> Colors and Fonts