Skip to content

Instantly share code, notes, and snippets.

fanatid / bip0037.js
Last active Jan 10, 2017
BIP-0037 example on JavaScript (bitcore-lib, bitcore-p2p, webcoin merkleTree)
View bip0037.js
var bitcore = require('bitcore-lib') // 0.13.14
var p2p = require('bitcore-p2p') // 1.1.0
var MerkleTree = require('webcoin/lib/merkleTree') // 1.0.2
var address = '1JSbd6CXJHzhGgadpio3HPXTZcSWzBHy3L'
var blockHash = '000000000000000006f9b9d985624bb621221cde9682a038a9a21403376c36f6' // 397690
// expect:
// tx: 0f15750e8a662ff7d02123677461477eb3b3222d6ca785b98f64c17d7d458699
// in block: 397697:0000000000000000021b3bd248ee38a47e0a9904d6a4bfbd7fcfe200bb533e97
// tx: ffe2822fd404e829ef4758617b01d2c4b9b26ab9a1a146e23be468aa0d881fa5
kanru / logserver.c
Created Sep 4, 2014
task tracer logserver
View logserver.c
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at */
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
romanbb / gist:8011102
Last active Apr 15, 2020
compile, push, and start SystemUI.apk
View gist:8011102
. build/
mmm frameworks/base/packages/SystemUI/
adb start-server
adb shell pkill -TERM -f
adb remount
adb push $OUT/system/priv-app/SystemUI.apk /system/priv-app/SystemUI.apk
adb shell pkill -TERM -f
adb shell chmod 0644 /system/app-priv/SystemUI.apk
sleep 2
arriolac / Android Studio
Last active Jun 27, 2018
Some Android Studio Tricks.
View Android Studio

Android Studio Notes

Android Studio keyboard shortcuts I use often.

Keyboard Shortcuts for Mac

  • SHIFT + F6 to refactor methods, classes, and variable names
  • CTRL + O to override methods
    • Generate getter, setter, and constructor method for a class (when in editor pane)
rvagg /
Last active Jul 3, 2020
Kindleberry "Paperwhite" Pi

Work in progress, I'll write this up properly when I'm done.

Almost all credit goes to @maxogden for putting me on to this and pointing me in the right direction for each of these items.


  • Raspberry Pi
  • Kindle Paperwhite freed from its locked down state (jailbroken)
    • You have to downgrade your Kindle to 5.3.1 to install the current jailbreak; that's just a matter of getting the old version image, putting it on your Kindle via USB and telling it to install "upgrade". Then you put in the Jailbreak files, load the ebook and break.
    • Your kindle will be quick to detect an upgrade is available so it'll want to upgrade soon afterwards but the jailbreak will last but you have to reinstall the developer certificates so it's a bit of a pain but doable. Find all the instructions on the forums and wiki.
purem / Wolfram alpha named parametric curves
Created Jan 31, 2013
Wolfram alpha named parametric curves
View Wolfram alpha named parametric curves
Enter into wolfram alpha to draw
witch of Agnesi
ampersand curve
Archimedean spiral
Archimedes' spiral
astroid pedal curve
bean curve
eikes / imgpreload.js
Created Oct 20, 2012
JavaScript image preloader with callback
View imgpreload.js
* Copyright (C) 2012 Eike Send
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
View Makefile
all: egl
egl: egl.cpp
g++ -lX11 -lEGL -lGLESv2 egl.cpp -o egl
greneholt / Random.jack
Created Mar 27, 2012
Jack pseudorandom number generator
View Random.jack
Random Number Generator
Original author: Taylor Wacker
Modified by: Connor McKay
This is a pseudo random number generator that uses the
Linear Congruential Generator (LCG) to generate random
class Random {
You can’t perform that action at this time.