Skip to content

Instantly share code, notes, and snippets.

View nishimura's full-sized avatar

Satoshi Nishimura nishimura

View GitHub Profile
<?php
/*
COPYRIGHT
Copyright 2007 Sergio Vaccaro <sergio@inservibile.org>
This file is part of JSON-RPC PHP.
JSON-RPC PHP is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<?php
// @see https://github.com/Bit-Wasp/bitcoin-lib-php
$xpcoin_mainnet_public = '0277f374';
$xpcoin_mainnet_private = '0277ef39';
$xpcoin_mainnet_version = '4b';
$xpcoin_testnet_public = '042f6fbd';
$xpcoin_testnet_private = '042f6859';
$xpcoin_testnet_version = '6f';
@nishimura
nishimura / db4blkindex.php
Last active January 9, 2018 11:52
Search Block Index by PHP5
<?php
// needs: PHP5, db4.so
// from oracle web site
//
// php db4blkindex.php <XP_data_directory> [<block hash suffix>]
error_reporting(-1);
#!/usr/bin/env bash
set -ue -o pipefail
export LC_ALL=C
DATETIME=`date +"%Y%m%d%H%M%S"`
USER=""
if [ $# -ge 1 ]; then
case "$1" in

Keybase proof

I hereby claim:

  • I am nishimura on github.
  • I am nishimura (https://keybase.io/nishimura) on keybase.
  • I have a public key whose fingerprint is 0D72 4534 492C E975 7EF1 5BB0 9125 8F45 C103 C2A5

To claim this, I am signing this object:

@nishimura
nishimura / Reload.hs
Created March 8, 2012 02:48
Reloading feature copied from yesod.
{-# LANGUAGE ScopedTypeVariables #-}
--
-- Copied from Yesod
-- see http://www.yesodweb.com/
--
module Reload (main, develLoop) where
-- reload
import Control.Concurrent (forkIO, threadDelay)
import qualified Control.Exception as Ex
@nishimura
nishimura / commit-msg
Created December 3, 2010 06:51
Add issue id to commit message.
#!/bin/bash
BRANCH=$(git symbolic-ref HEAD)
if [ "$BRANCH" == "refs/heads/master" ]; then
echo "cannot commit on master branch."
echo "please commit on topic branch."
exit 1
fi
grep '^refs #[0-9]\+: ' $1
@nishimura
nishimura / post-receive-email.php
Created March 1, 2010 09:18
post-commit-email for Japanese Encoding.
<?php
$from = `git config hooks.envelopesender`;
$to = `git config hooks.mailinglist`;
$emailprefix = `git config hooks.emailprefix`;
if (!$emailprefix)
$emailprefix = '[SCM]';
if (!isset($argc) || $argc < 3){