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
package main | |
import ( | |
"cloud.google.com/go/storage" | |
"context" | |
"github.com/minio/minio-go" | |
"google.golang.org/api/iterator" | |
"log" | |
"os" | |
) |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"time" | |
) | |
func runTimed(tick time.Duration, f func()) context.CancelFunc { |
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
var { Client } = require("pirsch-sdk"); | |
var client = new Client({ | |
hostname: "your-domain", // don't forget to set these! | |
clientID: "your-client-id", | |
clientSecret: "your-client-secret" | |
}); | |
client.domain() | |
.then(d => { |
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
(function() { | |
"use strict"; | |
if(navigator.doNotTrack === "1" || localStorage.getItem("disable_pirsch")) { | |
return; | |
} | |
const script = document.querySelector("#pirschjs"); | |
const endpoint = script.getAttribute("data-endpoint") || "https://api.pirsch.io/hit"; | |
const identificationCode = script.getAttribute("data-code"); |
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
(function() { | |
"use strict"; | |
window.pirsch = (name, options) => { | |
console.log(`Pirsch event: ${name}${options ? " "+JSON.stringify(options) : ""}`); | |
return Promise.resolve(null); | |
}; | |
if(navigator.doNotTrack === "1" || localStorage.getItem("disable_pirsch")) { | |
return; |
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
(function () { | |
"use strict"; | |
// The identification code for your website from the settings page. | |
// Required. | |
const identificationCode = ""; | |
// A comma-separated list of path patterns (regular expressions) to include. | |
// Optional. | |
const includePaths = ""; |
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
# Uncomment everything not specified here and change the domain. | |
proxy.yourdomain.com:443 { | |
reverse_proxy localhost:8080 | |
} |
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
package main | |
import ( | |
"log" | |
"time" | |
"github.com/robertkrimen/otto" | |
) | |
const ( |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Reading Percentage Demo</title> | |
<style type="text/css"> | |
body { | |
max-width: 800px; | |
padding: 40px; | |
margin: 0 auto; | |
font-family: sans-serif; |
OlderNewer