Skip to content

Instantly share code, notes, and snippets.

View tomohiro-n's full-sized avatar

Tomohiro Nakamura tomohiro-n

  • Startbahn
  • Dubai, UAE
  • X @HAIL
View GitHub Profile
-- UTCで2019/3/11の1日におけるMCH Heroの移動履歴にETHの移動をひもづけたもの
-- MCH Hero's transfer histories and associated Ethereum values on March 3rd 2019
SELECT
transfers.from_address AS token_from
, transfers.to_address AS token_to
, CASE transfers.to_address
WHEN '0x273f7f8e6489682df756151f5525576e322d51a3' THEN 'Hero'
WHEN '0x7be8076f4ea4a4ad08075c2508e481d6c946d12b' THEN 'OpenSea Auction'
WHEN '0x138a35ee20e40f019e7e7c00386ab2ef42d66d1e' THEN 'Hero Gateway'
WHEN '0x185b257aa51fdc45176cf1ffac6a0bfb5cf28afd' THEN 'Hero Gateway V2'
-- Hello World!
SELECT address, is_erc721, block_timestamp
FROM `bigquery-public-data.crypto_ethereum.contracts`
WHERE
block_timestamp > TIMESTAMP("2018-09-20") AND
block_timestamp < TIMESTAMP("2018-09-21") AND -- Just to reduce the bytes to query
address = '0x273f7f8e6489682df756151f5525576e322d51a3' -- One of MyCryptoHeros NFT
LIMIT 1000
@tomohiro-n
tomohiro-n / DateTimeServiceSpec.kt
Created November 9, 2017 05:23
Kotlin meetup - Spek sample
package tomohiron.kotlinserver.service
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.jetbrains.spek.api.dsl.on
import org.junit.jupiter.api.Assertions.assertFalse
import org.junit.jupiter.api.Assertions.assertTrue
import java.time.OffsetDateTime
@tomohiro-n
tomohiro-n / build.gradle
Created November 9, 2017 04:40
Kotlin meetup - build.gradle
group 'tomohiron.kotlinserver'
version '1.0-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.1.51'
ext.junit_jupiter_version = '5.0.1'
ext.jersey_version = '2.25.1'
ext.slf4j_version = '1.7.25'
ext.jackson_version = '2.9.1'
@tomohiro-n
tomohiro-n / threadDump-20150526-040957.txt
Created May 25, 2015 19:17
Another thread dump with IntelliJ Golang Plugin
"AWT-EventQueue-0 14.1.3#IU-141.1010.3, eap:false" prio=0 tid=0x0 nid=0x0 waiting on condition
java.lang.Thread.State: WAITING
on java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync@6bca82a3
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireInterruptibly(AbstractQueuedSynchronizer.java:897)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1222)
at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lockInterruptibly(ReentrantReadWriteLock.java:998)
at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:1173)
@tomohiro-n
tomohiro-n / dump.txt
Created May 24, 2015 17:52
Thread Dump of IntelliJ when it froze with Golang Plugin
2015-05-25 02:28:49
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode):
"JobScheduler FJ pool 0/4" #1179 daemon prio=6 os_prio=31 tid=0x000000010171b000 nid=0x15803 waiting on condition [0x000000014d055000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000007a86e7bb0> (a jsr166e.ForkJoinPool)
at jsr166e.ForkJoinPool.awaitWork(ForkJoinPool.java:1756)
at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1694)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
@tomohiro-n
tomohiro-n / Exercise: Equivalent Binary Trees
Created May 19, 2015 17:49
"Exercise: Equivalent Binary Trees" part of A Tour of Go
package main
import (
"code.google.com/p/go-tour/tree"
"fmt"
)
// Walk walks the tree t sending all values
// from the tree to the channel ch.
func Walk(t *tree.Tree, ch chan int) {
@tomohiro-n
tomohiro-n / .gitignore-only-spec-files
Last active August 29, 2015 14:19
If you want to ignore JavaScript files (probably because you're using AltJS such as TypeScript) but unit test files
src/app/**/*.js
!src/app/**/*.spec.js