This file contains hidden or 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
| # Allow Remote Execution Policy (this maybe already needed to run this script) | |
| Set-ExecutionPolicy RemoteSigned -scope CurrentUser | |
| # Install Scoop | |
| iwr -useb get.scoop.sh | iex | |
| # Use lessmsi to ensure it also run in any work environment | |
| scoop config MSIEXTRACT_USE_LESSMSI $true | |
| # Install core stuff |
This file contains hidden or 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
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "math/rand" | |
| "net/http" | |
| "os" | |
| "os/signal" | |
| "sync" |
This file contains hidden or 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
| public class Startup | |
| { | |
| public void ConfigureServices(IServiceCollection services) | |
| { | |
| // We have to add Authorization and at least one policy with at least one requirement. | |
| services.AddAuthorization(options => options.AddPolicy("default", a => a.RequireAuthenticatedUser())); | |
| services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) | |
| .AddJwtBearer(options => | |
| { |
This file contains hidden or 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
| <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" /> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"/> | |
| <script dangerouslySetInnerHTML={{__html: ` | |
| function enableCookies() { | |
| var s = document.createElement('script') | |
| s.async = true | |
| s.src = "https://www.googletagmanager.com/gtag/js?id=$_TRACKING_ID_$" | |
| s.id = 'google-analytics-script-tag' | |
| document.head.appendChild(s) |
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Collections.ObjectModel; | |
| using System.ComponentModel; | |
| using System.Linq; | |
| using System.Runtime.CompilerServices; | |
| namespace ConsoleApp1 | |
| { | |
| class Program |
This file contains hidden or 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
| import DgraphClient from 'dgraph-client'; | |
| // create a new client | |
| let client = new DgraphClient('localhost:8080'); | |
| // set objects | |
| let me = {name: 'Paul', size: 1.85, time: Date.now()}; | |
| await client.set(me); | |
| // query objects |
This file contains hidden or 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
| IMPORT_GLOBAL="github.com/dgraph-io/dgraph/protos/" | |
| IMPORT_LOCAL="../" | |
| mkdir -p ./protos/facetsp | |
| curl -s https://raw.githubusercontent.com/dgraph-io/dgraph/release/v0.7.5/protos/facetsp/facets.proto \ | |
| | sed "s,$IMPORT_GLOBAL,$IMPORT_LOCAL,g" > ./protos/facetsp/facets.proto | |
| mkdir -p ./protos/graphp | |
| curl https://raw.githubusercontent.com/dgraph-io/dgraph/release/v0.7.5/protos/graphp/graphresponse.proto \ | |
| | sed "s,$IMPORT_GLOBAL,$IMPORT_LOCAL,g" > ./protos/graphp/graphresponse.proto |
This file contains hidden or 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
| let queryReq = new Request(); | |
| queryReq.query = "query { me(id:paul) { name, size } }"; | |
| dgraph.run(queryReq, (err, res) => { | |
| // get me | |
| let me = res.n[0].children[0]; | |
| // list all properties | |
| me.properties.forEach(function (prop) { | |
| console.log(prop.prop + ": " + prop.value[prop.value.val]); |
This file contains hidden or 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
| let setReq = new Request(); | |
| setReq.mutation = new Mutation(); | |
| // a string value nquad | |
| let nqName = new NQuad(); | |
| nqName.subject = 'paul'; | |
| nqName.predicate = 'name'; | |
| nqName.objectValue = new Value().set('str_val', 'Paul Reichelt'); | |
| nqName.objectType = 10; |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
| [{"pid":27552,"tid":21432,"ts":104081999565,"ph":"X","cat":"toplevel","name":"MessageLoop::RunTask","args":{"src_file":"c:\\jenkins\\workspace\\libchromiumcontent-win\\src\\components\\scheduler\\base\\task_queue_impl.cc","src_func":"scheduler::internal::TaskQueueImpl::PushOntoImmediateIncomingQueueLocked"},"dur":447,"tdur":390,"tts":344388}, | |
| {"pid":27552,"tid":21432,"ts":104081999905,"ph":"X","cat":"toplevel","name":"TaskQueueManager::ProcessTaskFromWorkQueue","args":{"src_file":"c:\\jenkins\\workspace\\libchromiumcontent-win\\src\\base\\trace_event\\trace_log.cc","src_func":"base::trace_event::TraceLog::SetEnabled"},"dur":13,"tdur":12,"tts":344678}, | |
| {"pid":27552,"tid":21432,"ts":104081999920,"ph":"X","cat":"toplevel","name":"TaskQueueManager::ProcessTaskFromWorkQueue","args":{"src_file":"c:\\jenkins\\workspace\\libchromiumcontent-win\\src\\base\\trace_event\\trace_log.cc","src_func":"base::trace_event::TraceLog::SetEnabled"},"dur":38,"tdur":38,"tts":344692}, | |
| {"pid":27552,"tid":21432,"ts":104081999961,"ph":" |
NewerOlder