Skip to content

Instantly share code, notes, and snippets.

@Tatsh
Tatsh / oktaverify2totp.md
Created July 9, 2024 09:34 — forked from kamilhism/oktaverify2totp.md
Get TOTP secret key for Okta Verify
  1. Get the content of the QR for Okta Verify app setup. It looks like this: oktaverify://[email protected]/?t=XXXXX&f=YYYYY&s=https://DOMAIN.okta.com&issuer=DOMAIN.okta.com&isIdxEnabled=true
  2. Replace XXXXX, YYYYY and DOMAIN to your values in curl below:
curl --request POST \
  --url https://DOMAIN.okta.com/idp/authenticators \
  --header 'Accept: application/json; charset=UTF-8' \
  --header 'Accept-Encoding: gzip, deflate' \
  --header 'Authorization: OTDT XXXXX' \
  --header 'Content-Type: application/json; charset=UTF-8' \
@Tatsh
Tatsh / proxy.py
Created April 3, 2024 22:47 — forked from brianglass/proxy.py
Django Channels Websocket Proxy
import asyncio
import logging
import websockets
from channels.exceptions import DenyConnection
from channels.generic.websocket import AsyncWebsocketConsumer
from django.utils.functional import cached_property
logger = logging.getLogger(__name__)
@Tatsh
Tatsh / ldmacclientuninstall.sh
Created March 29, 2019 20:24 — forked from ferment/ldmacclientuninstall.sh
Remove LANDESK from OSX / macOS
#!/bin/sh
#
function killAllProcs( )
{
sudo /usr/bin/killall $1
/bin/ps ax | /usr/bin/grep $1|/usr/bin/awk '{print $1}'|/usr/bin/xargs sudo kill -9
}
echo "removing LANDesk Client"
@Tatsh
Tatsh / .gitignore
Last active August 29, 2015 14:01 — forked from octocat/.gitignore
# Compiled
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc
*.pyo
__pycache__/
@Tatsh
Tatsh / bitly.py
Last active December 14, 2015 10:39 — forked from mmueller/bitly.py
Modified to read `~/.bitly` file. PEP8 conformance.
#!/usr/bin/env python2
#
# Copyright 2009 Empeeric LTD. All Rights Reserved.
#
# Modified 2013 by Andrew Udvare
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#