Skip to content

Instantly share code, notes, and snippets.

@mduheaume
mduheaume / FindIdentifier.xml
Created October 6, 2023 19:03 — forked from rbrayb/FindIdentifier.xml
Using identities in Azure AD B2C
<?xml version="1.0" encoding="utf-8" ?>
<TrustFrameworkPolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.microsoft.com/online/cpim/schemas/2013/06"
PolicySchemaVersion="0.3.0.0"
TenantId="yourtenant.onmicrosoft.com"
PolicyId="B2C_1A_Identifier_signin"
PublicPolicyUri="http://yourtenant.onmicrosoft.com/B2C_1A_Identifier_signin"
DeploymentMode="Development"
UserJourneyRecorderEndpoint="urn:journeyrecorder:applicationinsights">
@mduheaume
mduheaume / keybase.md
Last active September 14, 2018 04:24
keybase.md

Keybase proof

I hereby claim:

  • I am mduheaume on github.
  • I am dekim (https://keybase.io/dekim) on keybase.
  • I have a public key whose fingerprint is 81A8 6E1C 39D2 30A3 F492 AD1B 5719 B671 CBBD 370B

To claim this, I am signing this object:

@mduheaume
mduheaume / itemkeytest.py
Created July 30, 2013 23:16
get_vehicles_by_item_key_test.py
import pysmi
output_fields = ['stock_number', 'item_key']
inventory = pysmi.connect_inventory()
results = inventory.get_inventory(output_fields=["item_key"], dealer_id=56, stock_status_name="in stock")['results']
item_keys = [v['item_key'] for v in results]
logger = logging.getLogger()
stream_handler = logging.StreamHandler()
stream_handler.setLevel(logging.DEBUG)
stream_handler.setFormatter(logging.Formatter('%(asctime)s - %(message)s'))
logger.addHandler(stream_handler)
@mduheaume
mduheaume / gist:5148370
Created March 13, 2013 00:22
CLI Helper
import sys
import __main__
class CLIUtility(object):
'''
A little helper for writing CLI tools.
Example: myclitool.py:
>>> cli = CLIUtility()
@mduheaume
mduheaume / gist:4020076
Created November 5, 2012 20:14
Print current revision
git rev-parse HEAD
@mduheaume
mduheaume / jslint.json
Created August 23, 2012 00:03 — forked from puleos/jslint.json
sublime text jslint settings
{
// Path to the jslint jar.
// Leave blank to use bundled jar.
"jslint_jar": "",
// Options pass to jslint.
"jslint_options": "--node --browser --white --sloppy --nomen --undef --unparam --vars",
// Ignore errors, regex.
"ignore_errors":
@mduheaume
mduheaume / gist:3409226
Created August 20, 2012 23:27
compressing a bunch of id's to construct a url
import random
import base64
import zlib
random_ids = [''.join([random.choice(string.ascii_lowercase) for x in range(8)]) for n in range(1000)]
long_string = ','.join(random_ids)
b64_string = base64.urlsafe_b64encode(long_string)
@mduheaume
mduheaume / difficulty.cs
Created January 29, 2012 21:52
Difficulty
/*
Add this in main Controller. It bases difficulty on p1Points but we can change this method to
set difficulty however we want.
*/
public int Difficulty {
get {
return p1Points>1?p1Points:1;
}
}
@mduheaume
mduheaume / CammeraController.cs
Created January 29, 2012 20:39
CamerController
using UnityEngine;
using System.Collections;
public class CameraController : MonoBehaviour {
Vector3 worldUp=new Vector3(0f, 0f, 0f);
public GameObject target;
public int CameraMode = 1;
void Start () {
}