This file contains hidden or 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
<script> | |
; (function () { | |
console.log('Loading Tracking Post and Fetch'); | |
// remember original methods | |
var origXhrOpen = XMLHttpRequest.prototype.open; | |
var origXhrSend = XMLHttpRequest.prototype.send; | |
var origFetch = window.fetch; | |
// patch XHR | |
XMLHttpRequest.prototype.open = function (method, url) { |
This file contains hidden or 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
// Get VisitorID | |
_paq.push([ function() { console.log("VisitorId:", this.getVisitorId()); }]); | |
// Get UserId | |
_paq.push([ function() { console.log("UserId:", this.getUserId()); }]); | |
// Get MatomoUrl | |
_paq.push([ function() { console.log("MatomoUrl:", this.getMatomoUrl()); }]); | |
// Get PiwikUrl |
This file contains hidden or 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
LINK: https://github.com/matomo-org/matomo/blob/6ad8083c6ad550cb04d346149f7a684e3347bdbb/core/Common.php#L34 | |
const REFERRER_TYPE_DIRECT_ENTRY = 1; | |
const REFERRER_TYPE_SEARCH_ENGINE = 2; | |
const REFERRER_TYPE_WEBSITE = 3; | |
const REFERRER_TYPE_CAMPAIGN = 6; | |
const REFERRER_TYPE_SOCIAL_NETWORK = 7; |
This file contains hidden or 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
./core/Period/Day.php: const PERIOD_ID = 1; | |
./core/Period/Week.php: const PERIOD_ID = 2; | |
./core/Period/Month.php: const PERIOD_ID = 3; | |
./core/Period/Year.php: const PERIOD_ID = 4; | |
./core/Period/Range.php: const PERIOD_ID = 5; |
This file contains hidden or 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
// ./matomo/vendor/matomo/device-detector/Parser/Device/AbstractDeviceParser.php | |
public const DEVICE_TYPE_DESKTOP = 0; | |
public const DEVICE_TYPE_SMARTPHONE = 1; | |
public const DEVICE_TYPE_TABLET = 2; | |
public const DEVICE_TYPE_FEATURE_PHONE = 3; | |
public const DEVICE_TYPE_CONSOLE = 4; | |
public const DEVICE_TYPE_TV = 5; // including set top boxes, blu-ray players,... | |
public const DEVICE_TYPE_CAR_BROWSER = 6; | |
public const DEVICE_TYPE_SMART_DISPLAY = 7; |
This file contains hidden or 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
-- mysql -u root -p | |
-- Check which users has access to a DB | |
SELECT * FROM mysql.db WHERE Db = 'DB_NAME'; | |
-- Check user access from which hosts | |
SELECT User, Host FROM mysql.user; | |
-- Create a new user |
This file contains hidden or 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
# https://github.com/matomo-org/matomo/blob/ac90a02c4b6b768227355049260d8f455561fd28/core/Tracker/Action.php#L23 | |
const TYPE_PAGE_URL = 1; | |
const TYPE_OUTLINK = 2; | |
const TYPE_DOWNLOAD = 3; | |
const TYPE_PAGE_TITLE = 4; | |
const TYPE_ECOMMERCE_ITEM_SKU = 5; | |
const TYPE_ECOMMERCE_ITEM_NAME = 6; | |
const TYPE_ECOMMERCE_ITEM_CATEGORY = 7; | |
const TYPE_SITE_SEARCH = 8; |
This file contains hidden or 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
curl --request POST \ | |
--url https://api.sendgrid.com/v3/mail/send \ | |
--header "Authorization: Bearer SG.USE_YOUR_SECRET_API_TOKEN_HERE" \ | |
--header "Content-Type: application/json" \ | |
--data '{"personalizations":[{"to":[{"email":"test@example.com"}]}],"from":{"email":"test@example.com"},"subject":"Testing SendGrid","content":[{"type":"text/plain","value":"Hello, Email!"}]}' |
This file contains hidden or 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
curl -f -sS https://plugins.matomo.org/api/2.0/plugins/LogViewer/download/latest?matomo=5.0.1 > plugins/LogViewer.zip |
This file contains hidden or 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
# Screen Quick Reference | |
## Basic | |
| Description | Command | | |
|---------------------------------------|---------------------------------------| | |
| Start a new session with session name | `screen -S <session_name>` | | |
| List running sessions / screens | `screen -ls` | | |
| Attach to a running session | `screen -x` | | |
| Attach to a running session with name | `screen -r <session_name>` | |
NewerOlder