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 fs = require('fs') | |
const { exec } = require('child_process') | |
function paddedZero(value) { | |
return (`0${value}`).slice(-2) | |
} | |
let today = new Date() | |
today = `${today.getFullYear()}-${paddedZero(today.getMonth()+1)}-${paddedZero(today.getDate())}` |
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
/* | |
Usage: | |
$ node crawler.js <url> <filename> | |
Example: | |
$ node crawler.js "https://jsonplaceholder.typicode.com/users" "users.json" | |
*/ | |
const https = require('https'); | |
const fs = require('fs'); |
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
$activities = array( | |
0 => 'None', | |
1 => 'Manufacturing', | |
2 => 'Researching Technology', | |
3 => 'Researching Time Efficiency', | |
4 => 'Researching Material Efficiency', | |
5 => 'Copying', | |
6 => 'Duplicating', | |
7 => 'Reverse Engineering', | |
8 => 'Invention', |
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
<?php | |
$today = date("Y-m-d"); | |
$file = "archive/".$today.".json"; | |
if (!file_exists($file)) { | |
$ores = [ | |
18 => 'Plagioclase', | |
19 => 'Spodumain', | |
20 => 'Kernite', |