Step 1
If any version of postman is installed we need to remove it
sudo rm -rf /opt/PostmanStep 2
| <? | |
| // | |
| // AUTO KEYWORD-BASED FOLLOWER CURATION BOT (by @levelsio) | |
| // | |
| // File: twitterFollowerCuratorBot.php | |
| // | |
| // Created: May 2021 | |
| // License: MIT | |
| // |
| //Import dependencies | |
| const bip32 = require('bip32') | |
| const bip39 = require('bip39') | |
| const bitcoin = require('bitcoinjs-lib') | |
| //Define the network | |
| const network = bitcoin.networks.bitcoin //use networks.testnet for testnet | |
| // Derivation path | |
| const path = `m/49'/0'/0'/0` // Use m/49'/1'/0'/0 for testnet |
| <? | |
| # MIT license, do whatever you want with it | |
| # | |
| # This is my invoice.php page which I use to make invoices that customers want, | |
| # with their address on it and which are easily printable. I love Stripe but | |
| # their invoices and receipts were too wild for my customers on Remote OK | |
| # | |
| require_once(__DIR__.'/../vendor/autoload.php'); |
| KEYMAPOPTS="us us" | |
| HOSTNAMEOPTS="-n alpine" | |
| INTERFACESOPTS="auto lo | |
| iface lo inet loopback | |
| auto eth0 | |
| iface eth0 inet dhcp | |
| hostname alpine | |
| " | |
| TIMEZONEOPTS="-z UTC" |
| var zip = new JSZip(); | |
| var count = 0; | |
| var zipFilename = "zipFilename.zip"; | |
| var urls = [ | |
| 'http://image-url-1', | |
| 'http://image-url-2', | |
| 'http://image-url-3' | |
| ]; | |
| urls.forEach(function(url){ |
| function paginate(array, page_size, page_number) { | |
| // human-readable page numbers usually start with 1, so we reduce 1 in the first argument | |
| return array.slice((page_number - 1) * page_size, page_number * page_size); | |
| } | |
| console.log(paginate([1, 2, 3, 4, 5, 6], 2, 2)); | |
| console.log(paginate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], 4, 1)); |
| # Read more about Slack webhooks here: https://api.slack.com/messaging/webhooks | |
| curl -X POST \ | |
| -H 'Content-type: application/json; charset=utf-8' \ | |
| --data '{ "channel": "#mychannel", "username": "superbot", "icon_emoji": ":bot:", "text": "Foo" }' \ | |
| https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX |
| jasmine.getEnv().addReporter({ | |
| suiteDone() { | |
| // Clear the styles after each test suite. | |
| const head: HTMLHeadElement = document.getElementsByTagName("head")[0]; | |
| const styles: HTMLCollectionOf<HTMLStyleElement> = head.getElementsByTagName("style"); | |
| for (let i = 0; i < styles.length; i++) { | |
| head.removeChild(styles[i]); | |
| } | |
| } | |
| }); |
| // <log errors to server> | |
| window.onerror = function (messageOrEvent, source, lineno, colno, error) { | |
| try { | |
| console.log({ | |
| //error message(string).Available as event (sic!) in HTML onerror = "" handler. | |
| messageOrEvent: messageOrEvent, | |
| //URL of the script where the error was raised(string) | |
| source: source, | |
| //Line number where error was raised(number) |