Skip to content

Instantly share code, notes, and snippets.

@ajsutton
ajsutton / basic.js
Created November 13, 2011 19:56
Long Poll JS Patterns
(function($) {
var longPollUrl = '/longpoll';
var lastReceivedSequence;
function poll() {
$.ajax(longPollUrl, {
data: { 'lastSequence': lastReceivedSequence },
dataType: 'json',
timeout: 15000,
@ajsutton
ajsutton / fillerHtml.html
Created March 2, 2012 02:29
Alternating Table Row Colours Filling A Scroll Panel
<div class="scroll">
<table class="striped">
<tbody>
<tr><td>Row 1</td></tr>
<tr><td>Row 2</td></tr>
<tr><td>Row 3</td></tr>
<tr><td>Row 4<br>With an extra line</td></tr>
<tr><td>Row 5</td></tr>
<tr class="filler"><td></td></tr>
</tbody>
@ajsutton
ajsutton / keybase.md
Created September 5, 2016 01:28
Keybase claim.

Keybase proof

I hereby claim:

  • I am ajsutton on github.
  • I am ajsutton (https://keybase.io/ajsutton) on keybase.
  • I have a public key ASD73wcWNQ6PyNkf31w7LXAeza1ZCmDVOPz5j626M-qdGQo

To claim this, I am signing this object:

@ajsutton
ajsutton / BackgroundLogger.java
Created September 26, 2011 20:13
Disruptor Example of Background Logging
import com.lmax.disruptor.RingBuffer;
import com.lmax.disruptor.dsl.Disruptor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class BackgroundLogger
{
private static final int ENTRIES = 64;
@ajsutton
ajsutton / CHANGELOG.md
Created November 16, 2018 02:25
Manual Changelog

Changelog

0.8.2

Removed

  • Removed import-blockchain command as nothing exports to the required format yet (PR #223)

Bug Fixes

  • Log spam: endless loop in nioEventLoopGroup (#248 - thanks to @5chdn for reporting) (PR #261)
  • Rinkeby import can stall with too many fragments (#228 thanks to @steffenkux and @5chdn for reporting) (PR #255)
@ajsutton
ajsutton / CHANGELOG.md
Last active November 16, 2018 02:37
Auto-changelog

Change Log

0.8.2 (2018-11-16)

Full Changelog

Implemented enhancements:

  • Allow nodekey to be specified separately to --datadir #233
  • When Pantheon shuts down, we should send disconnect messages to our peers #184
  • fixes #233 Allow nodekey to be specified separately to --datadir #234 (NicolasMassart)
/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/bin/java -Dlog4j.shutdownHookEnabled=false -Dvertx.disableFileCPResolving=true "-javaagent:/Users/aj/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/183.5153.38/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=56168:/Users/aj/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/183.5153.38/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath /Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Cont
3Box is a social profiles network for web3. This post links my 3Box profile to my Github account!
✅ did:muport:QmTmze4PBWMq3e9FhJdJ3SpgoCTXSThE1MC9wgrgaC7gTL ✅
Create your profile today to start building social connection and trust online. https://3box.io/
# HELP pantheon_executors_ethscheduler_workers_rejected_tasks_total Total number of tasks rejected by this executor
# TYPE pantheon_executors_ethscheduler_workers_rejected_tasks_total counter
pantheon_executors_ethscheduler_workers_rejected_tasks_total 0.0
# HELP pantheon_executors_ethscheduler_timer_completed_tasks_total Total number of tasks executed
# TYPE pantheon_executors_ethscheduler_timer_completed_tasks_total gauge
pantheon_executors_ethscheduler_timer_completed_tasks_total 38557.0
# HELP pantheon_executors_ethscheduler_transactions_queue_length_current Current number of tasks awaiting execution
# TYPE pantheon_executors_ethscheduler_transactions_queue_length_current gauge
pantheon_executors_ethscheduler_transactions_queue_length_current 10.0
# HELP pantheon_network_netty_workers_pending_tasks The number of pending tasks in the Netty workers event loop
package tech.pegasys.artemis;
import com.google.common.primitives.UnsignedLong;
import java.security.MessageDigest;
import java.security.Security;
import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.bytes.Bytes32;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import tech.pegasys.artemis.datastructures.Constants;
import tech.pegasys.artemis.datastructures.operations.DepositData;