# date: january 2018
# author: Dick de Leeuw ([email protected], @leeuwd)
# prerequisites: LAMP droplet (>= 8GB RAM)
# environment: Ubuntu 16.04.3 LTS xenial, Apache/2.4.29 (Ubuntu), MySQL 5.7.21 & PHP 7.1
# create dropletI am no longer working on this as the new API is US-only as I'm in the UK, so cannot even use it or the new app. Please don't ask me questions about it as I honestly can't remember anything.
This is a work in progress, just jotting down my findings from the APK decompile so far. As I can only read the decompiled Java and not MITM the app due it not working in the UK, getting the payload info may take a while. There's loads of API calls so this may not be thorough for a while.
Base URL: https://icm.infinitiusa.com/NissanLeafProd/rest
| <?php | |
| /* | |
| Plugin Name: Mautic WPML Preferred Language | |
| Plugin URI: https://www.robertwent.com/ | |
| Description: Sends WPML language preference to Mautic | |
| Version: 1.0 | |
| Author: Robert Went | |
| */ | |
| function mautic_wpml_lang_init() { |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Written as part of https://www.scrapehero.com/how-to-scrape-amazon-product-reviews-using-python/ | |
| from lxml import html | |
| import json | |
| import requests | |
| import json,re | |
| from dateutil import parser as dateparser | |
| from time import sleep |
The WooCommerce Gateway Amazon Payments Advanced REST API allows you to authorize, capture, and close authorization.
The endpoint is /wp-json/wc/v1/orders/<order_id>/amazon-payments-advanced/.
There's no custom endpoint to retrieve list of orders paid via Amazon Payments. The built-in orders point can be used with
_payment_method=amazon_payments_advanced filter.
| <?php | |
| add_filter( 'authenticate', 'rkv_disable_username_logins', 20, 3 ); | |
| /** | |
| * Disable admin username and redirect to Google (or another site). | |
| * | |
| * @param object $user The WP_User object. | |
| * @param string $username The entered username. | |
| * @param string $password The entered password. | |
| * |
| #!/bin/sh | |
| cat > /etc/network/interfaces.d/eth0-0.cfg <<EOF | |
| auto eth0:0 | |
| allow-hotplug eth0:0 | |
| iface eth0:0 inet static | |
| address 178.32.XXX.XXX | |
| netmask 255.255.255.255 | |
| broadcast 178.32.XXX.XXX | |
| post-up /sbin/ip route replace default via $(/sbin/ip route | awk '/default/ { print $3 }') dev eth0 src 178.32.XXX.XXX |
| # I will eat you family and your dog if you use FROM ubuntu for container that runs a service in production | |
| # Reading: http://phusion.github.io/baseimage-docker/ | |
| FROM phusion/baseimage:0.9.15 | |
| # inspired by https://github.com/progrium/buildstep | |
| RUN mkdir /build | |
| ADD ./files-build/ /build/ | |
| RUN chmod --recursive go-rwx /build | |
| RUN LC_ALL=C DEBIAN_FRONTEND=noninteractive /bin/bash /build/prepare | |
| RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
| document.getElementsByClassName("input")[1].innerHTML="This message was written via JS script! "; // Fills the text box message | |
| var input = document.getElementsByClassName("icon btn-icon icon-send");//Grabs the send button | |
| input[0].click();// Clicks the send button |
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |