Skip to content

Instantly share code, notes, and snippets.

@BlinkyStitt
BlinkyStitt / cgminer-rpc.py
Created December 20, 2011 08:24
very basic cgminer-rpc.py
#!/usr/bin/env python
"""
This works for me, but as always, YMMV
There are little things still @todo for the command line
but the class should be enough to do everything you need
basic localhost usage: ./cgminer-rpc <command>
"""
@BlinkyStitt
BlinkyStitt / making bitcoind
Last active October 3, 2015 18:27 — forked from andrewschaaf/gist:998886
compiling bitcoind on ubuntu-server 12.04
sudo apt-get update
sudo apt-get install -y git-core build-essential libssl-dev libboost-all-dev libdb5.1-dev libdb5.1++-dev libgtk2.0-dev
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin/src
make -f makefile.unix clean; make -f makefile.unix USE_UPNP= bitcoind
@BlinkyStitt
BlinkyStitt / gist:3751224
Created September 19, 2012 18:13
Wait for MySQL
#!/bin/bash
TIMEOUT=10
echo -n 'waiting for stop...'
i=0
while mysql -e 'show status' > /dev/null 2>&1; do
if [ $i -gt $TIMEOUT ]; then
echo 'failed!'
exit 1
@BlinkyStitt
BlinkyStitt / building armory-qt
Last active October 31, 2016 06:13
Building BitcoinArmory on OSX up to 10.8
Instructions for 10.9 are in the works.
Install and configure brew
$ ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
$ touch ~/.bashrc
$ echo "export CFLAGS=\"-arch x86_64\"" >> ~/.bashrc
$ echo "export ARCHFLAGS=\"-arch x86_64\"" >> ~/.bashrc
$ source ~/.bashrc
$ brew update
$ brew doctor
@BlinkyStitt
BlinkyStitt / tahoe howto
Last active December 15, 2015 21:59
Tahoe-LAFS
# Downloading and Installing Tahoe-LAFS
Note: I already have ~/bin on my path
mkdir ~/src
cd ~/src
wget https://tahoe-lafs.org/source/tahoe-lafs/releases/allmydata-tahoe-1.9.2.zip
unzip allmydata-tahoe-1.9.2.zip
cd allmydata-tahoe-1.9.2
python setup.py build
@BlinkyStitt
BlinkyStitt / tahoe htdigest howto
Last active December 16, 2015 19:39
These mac commands will generate a password hash for you to use to access the tahoe friend grid web proxy.
curl https://raw.github.com/samizdatco/nginx-http-auth-digest/master/htdigest.py -o htdigest.py
python htdigest.py for_bryan <YOURUSERNAME> tahoe
cat for_bryan | pbcopy
rm for_bryan
then paste me the contents of your clipboard
@BlinkyStitt
BlinkyStitt / gource-multi
Created July 17, 2013 01:09
Run gource over a bunch of repos and save an mp4
#!/usr/bin/env bash
# Generates gource video (h.264) out of multiple repositories.
# Pass the repositories in command line arguments.
# Example:
# <this.sh> /path/to/repo1 /path/to/repo2
OUTFILE="gource.mp4"
set -x
@BlinkyStitt
BlinkyStitt / pass4domain
Last active December 20, 2015 08:18
Take a domain and search in a subdirectory of pass for matching username and passwords to put into the clipboard. Also displays metadata that one day maybe a password manager could use for autofill. Uses pbcopy, so only works with OSX. Would be nice to make this work on linux, too.
#!/usr/bin/env bash
# Take a domain and search in a subdirectory of pass for matching username and
# password to put into the clipboard.
if [[ $# -lt 1 ]]; then
echo "Usage: $0 domain"
exit 1
fi
BASE_PATH="autofill"
@BlinkyStitt
BlinkyStitt / mavericks bitcoind 0.8.5 errors
Last active December 27, 2015 08:19
OSX 10.9 error while building bitcoind v0.8.5 with patches from https://github.com/WyseNynja/homebrew-bitcoin/blob/master/bitcoind.rb
$ make -f makefile.osx test
llvm-g++ -c -DTEST_DATA_DIR=/Users/bwstitt/src/bitcoin/src/test/data -DBOOST_TEST_DYN_LINK -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DMAC_OSX -DMSG_NOSIGNAL=0 -DBOOST_SPIRIT_THREADSAFE -DUSE_UPNP=1 -DUSE_IPV6=1 -I/Users/bwstitt/src/bitcoin/src/leveldb/include -I/Users/bwstitt/src/bitcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -I"/Users/bwstitt/src/bitcoin/src" -I"/Users/bwstitt/src/bitcoin/src/obj" -I"/usr/local/include" -I"/usr/local/opt/berkeley-db4/include" -I"/usr/local/opt/openssl/include" -MMD -MF obj-test/Checkpoints_tests.d -o obj-test/Checkpoints_tests.o test/Checkpoints_tests.cpp
In file included from test/Checkpoints_tests.cpp:9:
In file included from test/../util.h:32:
In file included from /Users/bwstitt/src/bitcoin/src/netbase.h:10:
/Users/bwstitt/src/bitcoin/src/serialize.h:911:10: error: class member cannot be redeclared
void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
^
/U
$ make -f makefile.osx
llvm-g++ -c -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DMAC_OSX -DMSG_NOSIGNAL=0 -DBOOST_SPIRIT_THREADSAFE -DUSE_UPNP=1 -DUSE_IPV6=1 -I/Users/bwstitt/src/bitcoin/src/leveldb/include -I/Users/bwstitt/src/bitcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -I"/Users/bwstitt/src/bitcoin/src" -I"/Users/bwstitt/src/bitcoin/src/obj" -I"/usr/local/include" -I"/usr/local/opt/berkeley-db4/include" -I"/usr/local/opt/openssl/include" -MMD -MF obj/alert.d -o obj/alert.o alert.cpp
In file included from alert.cpp:11:
In file included from /Users/bwstitt/src/bitcoin/src/alert.h:13:
In file included from /Users/bwstitt/src/bitcoin/src/util.h:32:
In file included from /Users/bwstitt/src/bitcoin/src/netbase.h:10:
/Users/bwstitt/src/bitcoin/src/serialize.h:911:10: error: class member cannot be redeclared
void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
^
/Users/bwstitt/src/bitcoin/src/serialize.h:898:10: note: previous