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 / 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.

@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 / 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.

<?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 / 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}`;
@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 / radios.m3u
Created February 20, 2021 11:32 — forked from fmarcia/radios.m3u
Radios playlist
#EXTM3U
#EXTINF:0,FIP
http://mp3.live.tv-radio.com/fip/all/fiphautdebit.mp3
#EXTINF:0,France Culture
http://mp3.live.tv-radio.com/franceculture/all/franceculturehautdebit.mp3
#EXTINF:0,France Inter
http://mp3.live.tv-radio.com/franceinter/all/franceinterhautdebit.mp3
@ptesny
ptesny / iframe.html
Created March 7, 2021 15:31 — forked from cirocosta/iframe.html
Sending messages from child iframe to parent webpage
<!DOCTYPE html>
<html>
<head>
<title>My Iframe</title>
</head>
<body>
<button>Botão</button>
<script type="text/javascript">
@ptesny
ptesny / OAuthClient.xsjslib
Created April 3, 2021 21:52 — forked from scanacs-agruhn/OAuthClient.xsjslib
OAuth2.0 Client for XSJS Classic with Client Credentials Grant Flow
/* OAuth Client for HANA XS - Runtime processing for HANA Base DU
*
* Provide the following functionality:
* - get authorize URI
* - exchange authorization code for access token (authorization code flow)
* - get access token by providing SAML assertion (SAML bearer flow)
* - enrich application request by access token
* - refresh flow
* - revoke token(s)
*
<repositories>
<repository>
<id>redhat-ga-repository</id>
<name>Red Hat GA repository</name>
<url>http://maven.repository.redhat.com/ga/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>