Skip to content

Instantly share code, notes, and snippets.

{
"Ansi 5 Color" : {
"Red Component" : 0.98751437664031982,
"Color Space" : "Calibrated",
"Blue Component" : 0.70531737804412842,
"Alpha Component" : 1,
"Green Component" : 0.29879066348075867
},
"Tags" : [
#!/usr/bin/env node
const path = require('path')
const { parse } = require('graphql')
const { ApolloClient } = require('apollo-client')
const { WebSocketLink } = require('apollo-link-ws')
const { SubscriptionClient } = require('subscriptions-transport-ws')
const { InMemoryCache } = require('apollo-cache-inmemory')
const ws = require('ws')
component: SubgraphInstanceManager
subgraph_id: QmT39RpMJt3BiPu3dsuQHh9QhggVG5Se1VHqNARKTptsgT
updates: 0
block_number: 7648899
block_hash: 0xb5896d5973cd0f85084e2be924a3af08e36c39e5259579e52f00c15cb1b97317
Jun 05 13:01:14.941 DEBG Contract call finished, time: 287ms, function: calcGav, contract: AccountingContract, address: 0xc81d…8f0d
Jun 05 13:01:14.941 TRCE Run with retry: eth_call RPC call (outer)
Jun 05 13:01:14.941 TRCE Run with retry: eth_call RPC call
Jun 05 13:01:15.061 DEBG Contract call finished, time: 121ms, function: totalSupply, contract: SharesContract, address: 0x9147…d3c2
Jun 05 13:01:15.061 TRCE Run with retry: eth_call RPC call (outer)
@Jannis
Jannis / test.md
Created November 26, 2018 19:00
Test

Test

Test1

diff --git a/store/postgres/src/entity_changes.rs b/store/postgres/src/entity_changes.rs
index 9876b34..8a96c9d 100644
--- a/store/postgres/src/entity_changes.rs
+++ b/store/postgres/src/entity_changes.rs
@@ -10,25 +10,27 @@ use graph::serde_json;
pub struct EntityChangeListener {
output: Option<Receiver<EntityChange>>,
- thread_handle: Option<thread::JoinHandle<()>>,
- terminate_thread: Arc<RwLock<bool>>,
@Jannis
Jannis / 3_create_origin_test_data.js
Created April 12, 2018 16:28
Populate Origin ListingsRegistry with test listings and purchases
var ListingsRegistry = artifacts.require("./ListingsRegistry.sol")
var Listing = artifacts.require("./Listing.sol")
var UserRegistry = artifacts.require("./UserRegistry.sol")
var PurchaseLibrary = artifacts.require("./PurchaseLibrary.sol")
module.exports = async deployer => {
var listingsRegistry = ListingsRegistry.at('0x648d3e19011e4ca1acdff12abbd1ebce5cfb0b83')
var listings = [
{
@Jannis
Jannis / compiled-index.js
Last active March 30, 2018 19:49
node_modules/symbol-observable/lib/ponyfill.js
goog.provide("module$Users$jannis$Work$oss$groom$node_modules$symbol_observable$lib$index");
goog.require("module$Users$jannis$Work$oss$groom$node_modules$symbol_observable$lib$ponyfill");
var module$Users$jannis$Work$oss$groom$node_modules$symbol_observable$lib$index={"default":{}};Object.defineProperty(module$Users$jannis$Work$oss$groom$node_modules$symbol_observable$lib$index["default"],"__esModule",{value:true});var _ponyfill$$module$Users$jannis$Work$oss$groom$node_modules$symbol_observable$lib$index=module$Users$jannis$Work$oss$groom$node_modules$symbol_observable$lib$ponyfill["default"];
var _ponyfill2$$module$Users$jannis$Work$oss$groom$node_modules$symbol_observable$lib$index=_interopRequireDefault$$module$Users$jannis$Work$oss$groom$node_modules$symbol_observable$lib$index(module$Users$jannis$Work$oss$groom$node_modules$symbol_observable$lib$ponyfill["default"]);function _interopRequireDefault$$module$Users$jannis$Work$oss$groom$node_modules$symbol_observable$lib$index(obj){return obj&&obj.__esModul
clojure.lang.ExceptionInfo: failed compiling file:src/main/groom/dsl.cljs {:file #object[java.io.File 0x1071ae7c "src/main/groom/dsl.cljs"]}
at clojure.core$ex_info.invokeStatic(core.clj:4739)
at clojure.core$ex_info.invoke(core.clj:4739)
at cljs.compiler$compile_file$fn__3702.invoke(compiler.cljc:1562)
at cljs.compiler$compile_file.invokeStatic(compiler.cljc:1523)
at cljs.compiler$compile_file.invoke(compiler.cljc:1499)
at cljs.closure$compile_file.invokeStatic(closure.clj:537)
at cljs.closure$compile_file.invoke(closure.clj:528)
at cljs.closure$fn__5114.invokeStatic(closure.clj:617)
at cljs.closure$fn__5114.invoke(closure.clj:611)
@Jannis
Jannis / groom-concept.md
Last active March 25, 2018 21:44
[WIP] Groom: A React/GraphQL framework for ClojureScript

[WIP] Groom: A React/GraphQL framework for ClojureScript

Principles

  • React for components
  • Component definitions with co-located queries and mutations
  • GraphQL for client-side state management
  • GraphQL for server queries and mutations
  • Prefer data over code (i.e. Hiccup-style UI definitions)
  • Two-level API:
@Jannis
Jannis / build.clj
Last active May 6, 2020 10:47
Using GraphQL / Apollo Client / React Apollo in the next ClojureScript release
;; Run using a local build of ClojureScript master, e.g.:
;; clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.155"}}}' -i build.clj
(require '[cljs.build.api :as b])
(b/watch "src"
{:output-dir "out"
:output-to "out/main.js"
:optimizations :none
:verbose true