Skip to content

Instantly share code, notes, and snippets.

View darkoromanov's full-sized avatar
👾
Coding Arduino

Diego Imbriani darkoromanov

👾
Coding Arduino
View GitHub Profile
/*
* Read https://cloud.google.com/translate/docs/quickstart-client-libraries
* for Google APIs authentication
*
* Dependencies: gettext-parser, sleep, @google-cloud/translate
*/
const fs = require('fs')
@darkoromanov
darkoromanov / scrape-world-spider-catalog.php
Last active March 15, 2019 14:46
PHP script to scrape the world spider catalog
<?php
/**
* This is a recursive script to download the whole World Spider Catalog (https://wsc.nmbe.ch/)
* I'm not responsible for any unauthorized use of the data.
* Please refer to WSC By laws https://wsc.nmbe.ch/resources/By-laws_WSCA.pdf
*/
/**
* Download PHP Simple HTML DOM Parser library from http://simplehtmldom.sourceforge.net/
@darkoromanov
darkoromanov / freemius-2-fomo.php
Last active July 22, 2021 17:58
Freemius integration for Fomo
<?php
// Fomo documentation: https://docs.fomo.com/reference
// Freemius documentation: http://freemius.com/help/documentation/marketing-automation/events-webhooks/
// Install Fomo PHP SDK https://github.com/usefomo/fomo-php-sdk
include "vendor/autoload.php";
define("FOMO_AUTH_TOKEN", "*********");
@darkoromanov
darkoromanov / install-wp-and-plugin.sh
Last active March 27, 2018 20:59
Bash script to create a new WordPress installation and install (and activate) a plugin. This is a prototype for a (much) more complex tool, it only performs tasks without checking if they fail.
#this is just a prototype, it performs tasks without checking if someone fails
clear
#db user
user=root
#db password
password=root