Skip to content

Instantly share code, notes, and snippets.

View ZaninAndrea's full-sized avatar
👨‍💻

Zanin Andrea ZaninAndrea

👨‍💻
View GitHub Profile
@ZaninAndrea
ZaninAndrea / hello_express.js
Created August 5, 2020 09:04
Minimal express.js example
const express = require('express')
const cors = require("cors")
const app = express()
app.use(cors())
const port = process.env.PORT || 3000
app.get('/', (req, res) => {
res.send('Hello World!')
})
@ZaninAndrea
ZaninAndrea / index.html
Created June 3, 2020 21:29
Rete.js (Events/Tasks)
<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>
function FindProxyForURL(url, host) {
if (!dnsDomainIs(host, "l-europe.b.pvp.net"))
return "DIRECT";
return "PROXY localhost:8080";
}
@ZaninAndrea
ZaninAndrea / lor.pac
Created February 2, 2020 22:38
proxy pac file
function FindProxyForURL(url, host) {
if (!shExpMatch(url, "*ample.com*"))
return "DIRECT";
return "PROXY localhost:8080";
}
@ZaninAndrea
ZaninAndrea / auto.pac
Last active February 2, 2020 22:29
proxy file for LoR
function FindProxyForURL(url, host) {
return "PROXY localhost:8080";
}
@ZaninAndrea
ZaninAndrea / README.md
Last active July 23, 2019 12:17
setup intel

Setup intel machine

curl https://gist.githubusercontent.com/ZaninAndrea/d8ee818c9d642a423c7d773f0873b0e0/raw/setup.sh -o setup.sh && bash setup.sh
@ZaninAndrea
ZaninAndrea / wipe.sh
Created July 8, 2019 09:13
webvalley wipe
sudo rm -rf /home/*
sudo rm -rf /tmp/*
sudo shutdown
@ZaninAndrea
ZaninAndrea / example-geojson.json
Last active May 15, 2019 09:45
example GeoJSON
[
{
"type": "Feature",
"properties": {
"party": "Republican"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
@ZaninAndrea
ZaninAndrea / electron-builder.yml
Created October 7, 2017 19:47
electron-builder.yml
appId: your.App.Id
publish:
provider: github
token: $$YOURTOKEN$$
// 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) {