Skip to content

Instantly share code, notes, and snippets.

Avatar

Jamie Dubs jamiew

View GitHub Profile
@jamiew
jamiew / snapshot.rb
Created Apr 29, 2022 — forked from dougpfeffer/snapshot.rb
NFT Collection Snapshot Generate with Moralis
View snapshot.rb
# Requires a Moralis API key.
# Writes out lists of owners of each token of each contract listed in the `CONTRACTS` array.
# Doesn't work on OpenSea contracts.
require 'net/http'
require 'uri'
require 'json'
MORALIS_API_KEY = ''
View HIP grooming report 2022-02-08.md
View gist:f4634c7a2709ac02c79e2d80eda45f89
#!/bin/bash
# @jamiew 2020-01-27
#
# Generate a Wu-Tang name using the "official" name generator
# https://www.mess.be/inickgenwuname.php
# (AKA the Childish Gambino Wu-Tang Name Generator)
# TODO output a more username-friendly format - no spaces or special chars
#
# This script depends on `curl`, `td` and `pup`
# Some clever regex could eliminate the need for pup
View gist:b5c98761e42e73cae599cf6ca2b42785
[Unit]
Description=IPFS daemon
After=network.target
[Service]
### Uncomment the following line for custom ipfs datastore location
# Environment=IPFS_PATH=/path/to/your/ipfs/datastore
ExecStart=/snap/bin/ipfs daemon --enable-pubsub-experiment --enable-namesys-pubsub --enable-gc --migrate
Restart=on-failure
@jamiew
jamiew / helium-etl-update.sh
Created Aug 13, 2020
Simple script to manually update and restat a Helium blockchain-etl node
View helium-etl-update.sh
#!/bin/sh
set -e
git pull origin master
make release
make migrations
make start
tail -F _build/dev/rel/blockchain_etl/log/console.log
@jamiew
jamiew / .gitconfig
Last active Jun 15, 2020
public pieces of my .gitconfig
View .gitconfig
[user]
name = Jamie Dubs
email = noreply@example.com
[apply]
whitespace = fix
[branch]
autosetuprebase = always
autosetupmerge = always
[color]
branch = auto
View mac_installation.sh
#!/bin/bash
# set firmware password
# sudo firmwarepasswd -setpasswd -setmode command
# Disable the Character Accent Menu and Enable Key Repeat
defaults write -g ApplePressAndHoldEnabled -bool false
# Prevent generate .DS_Store
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
@jamiew
jamiew / helium-score.sh
Last active Jan 29, 2020
Fetch node score from Helium API
View helium-score.sh
#!/bin/sh
# requires jq, for manipulating JSON:
# brew install jq
#
# find your hotspot's address here:
# https://explorer.helium.foundation/api/hotspots/
address="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
curl -s "https://explorer.helium.foundation/api/hotspots/$address" | jq '.data .score'
@jamiew
jamiew / git-friendly.rb
Created Dec 28, 2019
WIP git-friendly homebrew install
View git-friendly.rb
# /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/git-friendly.rb
# ```
# brew install --verbose --debug git-friendly
# brew audit --new-formula git-friendly
# brew test --verbose --debug git-friendly
# ```
class GitFriendly < Formula
desc "Streamline your git workflow: `pull`, `branch`, `merge`, `push`"
homepage "https://github.com/jamiew/git-friendly"
url "https://github.com/jamiew/git-friendly/archive/1.0.tar.gz"
@jamiew
jamiew / ._example output
Last active Dec 19, 2019
How I debugged my slow bash startup
View ._example output
# Start a new shell
... startup: 31
... git-completion: 113
... git-prompt: 41
... exports: 47
... rbenv: 216
... other scripts: 41
~$