Skip to content

Instantly share code, notes, and snippets.

View pzurek's full-sized avatar

Piotr Zurek pzurek

View GitHub Profile
pzurek / sale.json
Created June 2, 2016 18:26
Vend sale payload explanation
View sale.json
"register_id": "b1e198a9-f019-11e3-a0f5-b8ca3a64f8f4", // register to assign the sale to
"customer_id": "06e35f89-3783-11e6-ec7e-13193f7bd2ed", // [optional] customer associated with the sale
"user_id": "b1ed6158-f019-11e3-a0f5-b8ca3a64f8f4", // Vend user associated with the sale
"sale_date": "2016-05-05 23:35:34", // [optional] by default current time will be assigned
"note": "", // [optional] a note to be attached to the sale
"short_code": "mlzs94", // [optional] used for loyalty claiming
"invoice_number": "MR-1484-NZ", // [optional] invoice number, if omitted one will be assigned by
View dd_payload.json
"series": [
"metric": "zendesk.unassigned",
"points": [


This module should include three main elements that will allow for a full integration of Tidio Chat with a website based on typo3.

These elements are:

  1. Sending a request and saving a pair of the keys to the database
  2. Adding a new position in the admin menu
  3. Adding a script to the page content

Send request and save a pair of database keys

pzurek / getToken.js
Created January 29, 2015 04:40
Get token function
View getToken.js
// This function exchanges the authorization code for a token and returns the parsed info
function getToken(myCode, myDomainPrefix) {
var tokenUrl = "https://" + myDomainPrefix + "";
var payload = {
"code": myCode,
"client_id": myVendClientId,
"client_secret": myVendClientSecret,
"grant_type": "authorization_code",
"redirect_uri": myVendRedirectUri
pzurek /
Last active August 29, 2015 14:06
Chocolate coconut turds


  • Whittakers 72% Cocoa Dark Ghana Chocolate 250g
  • Condensed Milk ~800g (2 cans of Nestle Condensed Milk @ 395g)
  • Finely groud coconut 500g
  • Almonds ~150g - can be ground, sliced, or slivered - whatever floats your boat
  • Vanilla Extract 1 tsp.
  • Love


Keybase proof

I hereby claim:

  • I am pzurek on github.
  • I am pzurek ( on keybase.
  • I have a public key whose fingerprint is 1757 F1FF 0068 4C51 738C CB34 B4C3 0087 2944 31CD

To claim this, I am signing this object:

pzurek / pointers.go
Last active December 23, 2015 14:09
Pointers in Go. Short tale of asterisk and ampersand.
View pointers.go
package main
import "fmt"
func main() {
var a int
var b int
var c *int
a = 42
pzurek /
Last active September 12, 2023 15:59
Twelve Go Best Practices
pzurek / HttpClientTest.cs
Created August 8, 2013 08:50
Fails on Mono...
View HttpClientTest.cs
using System;
using System.Net.Http;
namespace VendTest
class MainClass
public static void Main(string[] args)
Client client = new Client();
pzurek / BTbyPower.applescript
Last active December 19, 2015 08:29
A little script that disables bluetooth when the power cable is disconnected and enables it back when plugged in
View BTbyPower.applescript
on idle
set powerStatus to do shell script "pmset -g ps"
tell application "System Preferences"
reveal pane id ""
tell application "System Events" to tell process "System Preferences"
set btCheckBox to checkbox "On" of window 1
if powerStatus contains "Battery Power" then
tell btCheckBox