Skip to content

Instantly share code, notes, and snippets.

@kdmukai
kdmukai / install_bitcoind_macos.md
Last active November 17, 2021 19:54
Install Bitcoin Core v22+ bitcoind on macOS

Install Bitcoin Core v22+ bitcoind on macOS

If you don't have wget installed:

brew install wget

Download binary and verification hashes

wget https://bitcoin.org/bin/bitcoin-core-22.0/bitcoin-22.0-osx64.tar.gz
@kdmukai
kdmukai / install_bitcoind_raspi.md
Last active November 14, 2021 20:31
Install Bitcoin Core v22+ bitcoind binary on a Raspberry Pi

Install Bitcoin Core v22+ bitcoind on a Raspberry Pi

Procedure has changed, starting with v22!

Download binary and verification hashes

wget https://bitcoin.org/bin/bitcoin-core-22.0/bitcoin-22.0-arm-linux-gnueabihf.tar.gz
wget https://bitcoin.org/bin/bitcoin-core-22.0/SHA256SUMS.asc
wget https://bitcoin.org/bin/bitcoin-core-22.0/SHA256SUMS
@kdmukai
kdmukai / bitcoin_diff.py
Last active April 30, 2020 00:25
Bitcoin price diff calculator based on YYYY-MM-dd purchased
"""
Usage: python3 bitcoin_diff.py 2017-06-28
outputs:
Price on 2017-06-28: $2584.56
Price on 2020-04-29: $8783.59
Difference: 239.85%
"""
import datetime
import json

Keybase proof

I hereby claim:

  • I am kdmukai on github.
  • I am keithmukai (https://keybase.io/keithmukai) on keybase.
  • I have a public key ASDUOmPehgibQKBnA-5CT2A-e-p8sIXkzj4tA38l71FVSwo

To claim this, I am signing this object:

@kdmukai
kdmukai / raspbian-python3.7.md
Last active August 22, 2024 14:01 — forked from dschep/raspbian-python3.6.rst
Installing Python 3.7 on Raspbian

Installing Python 3.7 on Raspbian

As of January 2018, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.

  1. Install the required build-tools (some might already be installed on your system).
$ sudo apt-get update
$ sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev
@kdmukai
kdmukai / __base_template.html
Last active August 29, 2015 13:56
Simple jQuery approach to a site-wide popup warning or action dialog with a page overlay to dim the background. This should eventually be packaged up as a plugin that can be loaded on a per-page basis rather than living in the __base_template.html
<html>
<body>
<style>
.page_overlay {
display: none;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
@kdmukai
kdmukai / register.html
Created July 26, 2012 01:16
Facebook registration with django_facebook
{% load url from future %}
<link href="{{ STATIC_URL }}css/facebook.css" type="text/css" rel="stylesheet" media="all" />
{% include 'django_facebook/_facebook_js.html' %}
Register!
<form action="{% url 'facebook_connect' %}?facebook_login=1" method="post">
<a href="javascript:void(0);" style="font-size: 20px;" onclick="F.connect(this.parentNode);">Login or register with facebook</a>
<input type="hidden" value="{% url 'my_post_registration_url' %}" name="register_next" />
@kdmukai
kdmukai / about_us.html
Created June 9, 2012 20:42
Adding a page with Django
{% extends 'visitor/_visitor_base.html' %}
{% block page_title %}About Us{% endblock %}
{% block page_headline_text %}About Us{% endblock %}
{% block page_content %}
This is the About Us text
{% endblock %}
@kdmukai
kdmukai / IndexServlet.java
Created June 9, 2012 20:08
Adding a page with Java, Tiles, and JSP
package com.essaytagger.web.user.administrator;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.tiles.TilesContainer;
import org.apache.tiles.servlet.context.ServletUtil;
@kdmukai
kdmukai / Example1.java
Created November 4, 2011 18:06
_GenericDaoHibernateImpl<T> excerpt with session-safe getHibernateTemplate.save()
Cat oldCat = catDao.get(oldCatId);
Cat newCat = new Cat();
newCat.setName("Whiskers");
newCat.setOwner(oldCat.getOwner());
catDao.save(newCat); // Causes Session conflict because Owner isn't initialized