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 onOpen() { | |
SpreadsheetApp.getUi().createMenu("Alliance Functions").addItem("Get Members", "getMembers").addToUi(); | |
} | |
function parseMember(member) { | |
return [member.id, member.nation_name, member.leader_name, member.score]; | |
} | |
function getMembers() { | |
const response = UrlFetchApp.fetch("https://api.politicsandwar.com/graphql?api_key=YOURAPIKEY", { |
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
/* | |
Non Attacking Queens Template | |
Copyright (c) 2019 Dylan Seidt <dylan.seidt@gmail.com> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/bionic64" | |
config.vm.network "public_network" | |
config.vm.provision "shell", privileged: false, path: "https://gist.githubusercontent.com/DDynamic/afd1cc378fbd470d66fd718425b3b52e/raw/provision.sh" | |
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
sudo adduser <username> www-data | |
sudo chown -R www-data:www-data /var/www | |
sudo chmod -R g+rwX /var/www |
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 READJSON(input, key) { | |
if (input.map) { | |
return input.map(function(input) { | |
return READJSON(input, key) | |
}); | |
} else { | |
if (input || 0 !== input.length) { | |
var value = key.split('.').reduce(function(a, b) { | |
return a[b] || ""; | |
}, JSON.parse(input)); |