curl https://gist.githubusercontent.com/ZaninAndrea/d8ee818c9d642a423c7d773f0873b0e0/raw/setup.sh -o setup.sh && bash setup.sh
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 id="rete" class="node-editor"></div> | |
<a target="_blank" href="https://github.com/retejs/rete"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/652c5b9acfaddf3a9c326fa6bde407b87f7be0f4/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"></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
function FindProxyForURL(url, host) { | |
if (!dnsDomainIs(host, "l-europe.b.pvp.net")) | |
return "DIRECT"; | |
return "PROXY localhost:8080"; | |
} |
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 FindProxyForURL(url, host) { | |
if (!shExpMatch(url, "*ample.com*")) | |
return "DIRECT"; | |
return "PROXY localhost:8080"; | |
} |
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 FindProxyForURL(url, host) { | |
return "PROXY localhost:8080"; | |
} |
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
sudo rm -rf /home/* | |
sudo rm -rf /tmp/* | |
sudo shutdown |
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
[ | |
{ | |
"type": "Feature", | |
"properties": { | |
"party": "Republican" | |
}, | |
"geometry": { | |
"type": "Polygon", | |
"coordinates": [ | |
[ |
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
// The resolvers | |
const resolvers = { | |
// ... | |
Book: { | |
// ... | |
fullContent(root, args, context) { | |
return new Promise((resolve, reject) => { | |
if (!context.auth) { | |
resolve("This is a preview of the book") | |
} else if (context.auth.bookId === root.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
const expressJwt = require("express-jwt") | |
// The GraphQL endpoint | |
app.use( | |
"/graphql", | |
bodyParser.json(), | |
expressJwt({secret: "JWT_SECRET", credentialsRequired: false}), | |
graphqlExpress(req => ({ | |
schema, | |
context: { |
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
const jwt = require("jwt-simple") | |
const moment = require("moment") | |
// ... | |
const resolvers = { | |
// ... | |
Mutation: { | |
buyBook(root, args, content) { | |
return new Promise((resolve, reject) => { |