Skip to content

Instantly share code, notes, and snippets.

{
"data": {
"communitySubgraphs": {
"subgraphs": [
{
"id": "197",
"name": "augur-v2-kovan",
"displayName": "Augur V2 Kovan",
"image": "https://storage.googleapis.com/subgraph-images/default/sg-5.png",
"draft": true,
@nenadjaja
nenadjaja / everest-script.js
Created March 17, 2020 02:58
everest script
const fs = require('fs')
const path = require('path')
const execa = require('execa')
const projectId = '0x3da18463aac062323bcef2d408c2724da3868da1'
const filename = path.join(__dirname, 'public/project', 'index.html')
const newDir = path.join(__dirname, `public/project/${projectId}`)
const newFilename = path.join(
__dirname,
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:muport:Qmckjnwkfh64YnVJT3Yo18yYhyVmJPspRe1fATNCdf6jgg ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@nenadjaja
nenadjaja / Graph node logs
Created August 1, 2019 16:35
Local node logs
$ cargo run -p graph-node --release -- \  5  09:29:11 
--postgres-url postgresql://nevena@localhost:5432/graph-node \
--ethereum-rpc mainnet:https://mainnet.infura.io/ \
--ipfs 127.0.0.1:5001 \
--debug
Finished release [optimized] target(s) in 1.41s
Running `target/release/graph-node --postgres-url 'postgresql://nevena@localhost:5432/graph-node' --ethereum-rpc 'mainnet:https://mainnet.infura.io/' --ipfs '127.0.0.1:5001' --debug`
Aug 01 09:31:03.462 INFO Graph Node version: 0.14.0 :: v0.5.0+798 (397ffff3d 2019-07-30) dirty 33 modifications
Aug 01 09:31:03.464 DEBG Setting up Sentry
Aug 01 09:31:03.466 INFO Starting up
@nenadjaja
nenadjaja / Data-model.md
Last active December 4, 2018 21:44
Data model for subgraphs including deployments, organizations, names..etc
type Subgraph {
  id: ID!
  name: String!
  imageUrl: String!
  featured: Boolean
}

type Deployment {
 id: ID!
Open multiple terminal tabs, and run the following in each one:
1. `$ ganache-cli` (or if you want the new, not released ganache, follow the steps here: )
2. Pull this repo: https://github.com/graphprotocol/hackathon-scaffold and cd into the ethereum folder
3. Run `$ truffle compile` followed by `truffle migrate` --> it should give you the contract address under "Deploying Events"
4. Copy that address, and paste it into `subgraph.yaml` (subgraph manifest) inside of the hackathon-scaffold project
5. Start `ipfs daemon` in a separate terminal tab
6. Run `createdb scaffold` in another tab to create a database
7. Pull graph-node and run:
cargo run -p graph-node --release -- \  13  09:47:43 
--postgres-url postgresql://nevena@localhost:5432/scaffold \
Loading runner configuration...
09:15:57 workers.1 | 2018-05-29T16:15:57Z p-90279 t-ow5l9q1mk DEBUG: New configuration: #<Sneakers::Configuration:0x00007fbdbeeee368 @hash={:error_reporters=>[#<Sneakers::ErrorReporter::DefaultLogger:0x00007fbdc04c8968>], :runner_config_file=>nil, :metrics=>nil, :daemonize=>false, :start_worker_delay=>0.2, :workers=>2, :log=>#<IO:<STDOUT>>, :pid_path=>"sneakers.pid", :amqp_heartbeat=>30, :timeout_job_after=>10 minutes, :prefetch=>10, :threads=>1, :share_threads=>false, :ack=>true, :heartbeat=>30, :hooks=>{:before_fork=>#<Proc:0x00007fbdc6176570@/Users/nena/Documents/projects/mandala/config/initializers/sneakers.rb:33>, :after_fork=>#<Proc:0x00007fbdc6177420@/Users/nena/Documents/projects/mandala/config/initializers/sneakers.rb:26>}, :exchange=>"sneakers", :exchange_options=>{:type=>:direct, :durable=>true, :auto_delete=>false, :arguments=>{}}, :queue_options=>{:durable=>true, :auto_delete=>false, :exclusive=>false, :arguments=>{}}, :amqp=>"amqp://localhost", :vhost=>"/", :handl
@nenadjaja
nenadjaja / cut bio
Created May 11, 2018 18:31
cut bio
Profile.all.each do |profile|
if (profile.bio && profile.bio.length > 800)
new_bio = profile.bio[0..798].split('.')
new_bio.pop if new_bio.size > 1
updated = new_bio.join() + '.'
profile.update(bio: updated)
end
end
@nenadjaja
nenadjaja / Form styles
Created November 30, 2016 01:03
CSS for the registration form
div#upme-registration {
width: 90% !important;
}
div#upme-registration-form .upme-field-value {
width: 50% !important;
}
button#upme-register {
padding: 10px 20px;
@nenadjaja
nenadjaja / bash_profile
Last active April 25, 2016 20:51
Customized iterm
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function prompt {
local BLACK="\[\033[0;30m\]"
local BLACKBOLD="\[\033[1;30m\]"
local RED="\[\033[0;31m\]"
local REDBOLD="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"