Skip to content

Instantly share code, notes, and snippets.

View iterm2-profile.json
{
"Ansi 5 Color" : {
"Red Component" : 0.98751437664031982,
"Color Space" : "Calibrated",
"Blue Component" : 0.70531737804412842,
"Alpha Component" : 1,
"Green Component" : 0.29879066348075867
},
"Tags" : [
View mass-subscriptions.js
#!/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')
View subgraph.log
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)
View diff.patch
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 Apr 12, 2018
Populate Origin ListingsRegistry with test listings and purchases
View 3_create_origin_test_data.js
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 Mar 30, 2018
node_modules/symbol-observable/lib/ponyfill.js
View compiled-index.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
View cljs-macros-build.log
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 Mar 25, 2018
[WIP] Groom: A React/GraphQL framework for ClojureScript
View groom-concept.md

[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
Using GraphQL / Apollo Client / React Apollo in the next ClojureScript release
View build.clj
;; 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