Skip to content

Instantly share code, notes, and snippets.

View lanzafame's full-sized avatar

Adrian Lanzafame lanzafame

View GitHub Profile
@lanzafame
lanzafame / singularity-workshop.md
Last active February 8, 2024 10:42 — forked from SgtCoin/singularity-workshop.md
Singularity Workshop

Singularity Workshop Guide

Welcome to the Singularity Workshop!

Getting Started

This instruction will guide you through all steps necessary to use Singularity to

  1. Prepare an open dataset from S3
  2. Send deal to a local emulated storage provider f02815405
  3. Make retrievals from the emulated storage provider using HTTP and Bitswap
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEYeI9oxYJKwYBBAHaRw8BAQdAG0mTGS5wAN9zcuQwZwXc7M76j4y7VRK2rDxp
+RyQFJm0JEZpbGVjb2luIHRydXN0ZWQtc2V0dXAgZXN1IGxhbnphZmFtZYiQBBMW
CAA4FiEEYZg894/36IYt9pizQSxZ57IcTKoFAmHiPaMCGwMFCwkIBwIGFQoJCAsC
BBYCAwECHgECF4AACgkQQSxZ57IcTKrnCgEAl6zvNQ7gGPc0SmBsLtMUIINrypc+
QKOBw7eF9sH+u+kA/ixMcljKoQmfO5P4GbNJX+7K6hOWpk6uqhnzSdLAqmEO
=ncCg
-----END PGP PUBLIC KEY BLOCK-----
@lanzafame
lanzafame / wide-github-prs.css
Last active March 19, 2019 01:37
Wide Github PRs
/*
Remove from this comment when putting the css into Stylus
url regex: /^https?://github\.com/.+?/pull/.*/files.*$/
*/
@media only screen and (min-width: 1900px) {
.file {
width: 1500px;
margin-left: -250px;
}
.comment-holder,

Keybase proof

I hereby claim:

  • I am lanzafame on github.
  • I am lanzafame (https://keybase.io/lanzafame) on keybase.
  • I have a public key whose fingerprint is 3698 5E8D 36C5 FDE9 D463 45D1 87E4 0C5D 62EA E192

To claim this, I am signing this object:

@lanzafame
lanzafame / git_fzf_key_bindings.fish
Created August 30, 2018 04:39 — forked from aluxian/git_fzf_key_bindings.fish
Key bindings for git+fzf ported to Fish shell https://junegunn.kr/2016/07/fzf-git/
function __git_fzf_is_in_git_repo
command -s -q git
and git rev-parse HEAD >/dev/null 2>&1
end
function __git_fzf_git_status
__git_fzf_is_in_git_repo; or return
git -c color.status=always status --short | \
fzf -m --ansi --preview 'git diff --color=always HEAD -- {-1} | head -500' | \
cut -c4- | \
@lanzafame
lanzafame / blockstack
Created April 11, 2018 05:55
Blockstack
Verifying my Blockstack ID is secured with the address 15Tx5vaUVL2oMSW3ygWXxBdTNaQjTjQWCE https://explorer.blockstack.org/address/15Tx5vaUVL2oMSW3ygWXxBdTNaQjTjQWCE
@lanzafame
lanzafame / blockstack
Created April 11, 2018 05:55
Blockstack
Verifying my Blockstack ID is secured with the address 15Tx5vaUVL2oMSW3ygWXxBdTNaQjTjQWCE https://explorer.blockstack.org/address/15Tx5vaUVL2oMSW3ygWXxBdTNaQjTjQWCE
@lanzafame
lanzafame / error output - ipfs
Last active March 15, 2018 03:15
Docker build gx issues (MacOS)
$ docker build .
...
gx install --global
/bin/sh: 1: gx: Exec format error
mk/gx.mk:4: recipe for target 'gx-deps' failed
make: *** [gx-deps] Error 2
The command '/bin/sh -c cd $SRC_DIR && mkdir .git/objects && ([ -z "$GX_IPFS" ] || echo $GX_IPFS > /root/.ipfs/api) && make build' returned a non-zero code: 2
@lanzafame
lanzafame / nmcli-toggle.py
Last active July 11, 2016 06:37 — forked from un-def/nmcli-toggle.py
Toggle network connection up/down using nmcli
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import subprocess
if len(sys.argv) < 2:
print("Usage: nmcli-toggle.py connection_id")
sys.exit()
conn_id = sys.argv[1]
active = subprocess.check_output(['nmcli', 'connection', 'show', '--active'])
up_down = ('up', 'down')[bytes(conn_id, 'utf-8') in active]
@lanzafame
lanzafame / check.go
Last active June 17, 2016 01:44 — forked from mattes/check.go
Check if file or directory exists in Golang
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
// path/to/whatever does not exist
}
if _, err := os.Stat("/path/to/whatever"); err == nil {
// path/to/whatever exists
}