Skip to content

Instantly share code, notes, and snippets.

@pitbulk
pitbulk / alexa_skill_dhl_poc_code.py
Last active April 2, 2020 18:16
Alexa Skill for DHL POC - Code
# -*- coding: utf-8 -*-
# This sample demonstrates handling intents from an Alexa skill using the Alexa Skills Kit SDK for Python.
# Please visit https://alexa.design/cookbook for additional examples on implementing slots, dialog management,
# session persistence, api calls, and more.
# This sample is built using the handler classes approach in skill builder.
import logging
import ask_sdk_core.utils as ask_utils
import os
import json
@pitbulk
pitbulk / aws-onelogin-integration.template
Last active May 12, 2020 03:43
StackSet template for deploying Onelogin with AWS Control Tower
AWSTemplateFormatVersion: 2010-09-09
Description: Create OneLogin IDP, Role to allow OL extract account role list and default roles on all accounts.
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
-
Label:
default: "OneLogin SAML IDP"
Parameters:

Keybase proof

I hereby claim:

  • I am pitbulk on github.
  • I am sixtomartin (https://keybase.io/sixtomartin) on keybase.
  • I have a public key whose fingerprint is 00A7 B553 5E32 A334 F3C6 7810 402B 9B9A AF12 C40F

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am pitbulk on github.
* I am sixtomartin (https://keybase.io/sixtomartin) on keybase.
* I have a public key ASAFlCZu6Iy--QmSxJQQaNZC4W6ViaV8AIY4_LBafgop7Ao
To claim this, I am signing this object:
@pitbulk
pitbulk / onelogin_import_users.py
Last active January 23, 2018 17:27
Script that import users in OneLogin. Support roles, groups and custom_roles (works as import UI)
#!/usr/bin/python
# Requires onelogin, csv342 and optparse-pretty
from __future__ import unicode_literals
import csv342 as csv
import io
import json
import os.path
@pitbulk
pitbulk / gist:ff028a9ba472ed810e54a976d583ef88
Last active October 3, 2023 03:13
Magento 2 - Default Country Code list
AF - Afghanistan
AX - Åland Islands
AL - Albania
DZ - Algeria
AS - American Samoa
AD - Andorra
AO - Angola
AI - Anguilla
AQ - Antarctica
AG - Antigua & Barbuda
@pitbulk
pitbulk / OneLogin.py
Last active June 7, 2017 08:37 — forked from foxwill/OneLogin.py
to create token object and use with the Users OAUTH api endpoint
import requests
class OneLogin(object):
def __init__(self, shard='US'):
"""
Specify the shard of the system being used (us or eu)
:param shard: us or eu
:return:
"""
@pitbulk
pitbulk / get_apps_to_embed_for_a_user.php
Last active March 17, 2017 16:05
Onelogin - Embed Apps API
<?php
// URL & credentials
$url = "https://api.onelogin.com/client/apps/embed2";
// Parameters
$embed_token = "<embed_token>";
$email = "<email>";
$query_parameters = array(
@pitbulk
pitbulk / 01 - generate_invite_link.php
Last active March 15, 2017 21:52
Onelogin - Invite Link APi
@pitbulk
pitbulk / 01 - get_groups.php
Last active March 15, 2017 21:31
Onelogin - Groups APi
<?php
// URL & credentials
$url = "https://api.<us or eu>.onelogin.com/api/1/groups";
$access_token = "<access_token>";
// Parameters
$query_parameters = array(
// -- Search --
'id' => '',