type Subgraph {
id: ID!
name: String!
imageUrl: String!
featured: Boolean
}
type Deployment {
id: ID!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias.l=log --pretty=oneline -n 20 --graph --abbrev-commit | |
alias.s=status -s | |
alias.d=!git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat | |
alias.di=!d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d | |
alias.p=!git pull; git submodule foreach git pull origin master | |
alias.c=clone --recursive | |
alias.ca=!git add -A && git commit -av | |
alias.go=checkout -B | |
alias.tags=tag -l | |
alias.branches=branch -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is my array | |
posts = [{"name"=> "Post1", "start_on"=>"2015-08-11 10:50:00"}, {"name"=>"Post2", "start_on"=>"2015-08-11 10:50:00"}, {"name"=> "Post3", "start_on"=>"2015-08-14 11:00:00"}, {"name"=> "Post4", "start_on"=>"2015-08-14 11:00:00"}] | |
# this method should group posts by start_on property | |
def group(posts) | |
posts.group_by { |p| | |
puts "TEST" | |
puts p.inspect | |
Time.parse(p['start_on']) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arrayToFlatten = [ | |
'item', | |
{ | |
someKey: 'someValue', | |
arrayKey: [ 'h', 'e', 'l', 'l', 'o' ] | |
}, | |
undefined, | |
null, | |
1234, | |
[ 5, 6, 7, 8 ], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var UrlsClass = function(urls) { | |
if (this.window === this) { | |
return new Error("You should use the word new!"); | |
} | |
this.urls = urls; | |
}; | |
// ["A", "B", "A", "C"] | |
// getUrls(10) -> ["C", "A", "B"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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\]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div#upme-registration { | |
width: 90% !important; | |
} | |
div#upme-registration-form .upme-field-value { | |
width: 50% !important; | |
} | |
button#upme-register { | |
padding: 10px 20px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ |
OlderNewer