Skip to content

Instantly share code, notes, and snippets.

View ptesny's full-sized avatar

Piotr Tesny ptesny

  • SAP UK Ltd
  • London
View GitHub Profile
@ptesny
ptesny / crayola.mss
Created January 24, 2021 00:58 — forked from palewire/crayola.mss
The 133 standard Crayola crayon colors in CartosCSS and ready for use with TileMill.
/*
Crayola crayon colors
Compiled by @LATdatadesk
Source: http://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors
*/
// Standard colors
@almond: #EFDECD;
@antique_brass: #CD9575;
@ptesny
ptesny / oauth.js
Created January 11, 2021 19:28 — forked from srph/oauth.js
axios: interceptor which includes your oauth token in every request as an Authorization header
import axios from 'axios';
// You can use any cookie library or whatever
// library to access your client storage.
import cookie from 'cookie-machine';
axios.interceptors.request.use(function(config) {
const token = cookie.get(__TOKEN_KEY__);
if ( token != null ) {
config.headers.Authorization = `Bearer ${token}`;
<?php
require __DIR__ . "/../vendor/autoload.php";
/**
* Thanks to clear documentation:
* https://developer.twitter.com/en/docs/basics/authentication/oauth-1-0a/creating-a-signature
*
*/
@ptesny
ptesny / curl.md
Created October 9, 2020 17:26 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@ptesny
ptesny / kubectl-delete_all
Created September 2, 2020 10:18 — forked from superbrothers/kubectl-delete_all
Kubernetes: Delete all objects in the namespace
kubectl delete "$(kubectl api-resources --namespaced=true --verbs=delete -o name | tr "\n" "," | sed -e 's/,$//')" --all
@ptesny
ptesny / saml.md
Created July 27, 2020 19:38 — forked from perigee/saml.md

Top references

SAML2 Notes


SAML2.0 is an XML based portocol using security tokens containing assertions to pass information about a principal (ex. end user) between a SAML authority (Idp-Identity provider, for planet labs, it is MS ADFS 2012 R2), and a SAML consumer (SP-service provider, for example, plotly On-Prem side authentication). The standrad was ratified as an OASIS standard in 03/2005, which eventually may be replaced by Oauth2 based OpenID.