Skip to content

Instantly share code, notes, and snippets.

@oliverrahner
oliverrahner / Convert-SPExport2010to2013.ps1
Last active October 20, 2015 10:37
Powershell function to convert Sharepoint 2010 exports to Sharepoint 2013
# --- ConvertFrom-Cab courtesy of https://technet.microsoft.com/en-us/magazine/2009.04.heyscriptingguy.aspx
Function ConvertFrom-Cab($cab,$destination)
{
$comObject = "Shell.Application"
Write-Debug "Creating $comObject"
$shell = New-Object -Comobject $comObject
if(!$?) { $(Throw "unable to create $comObject object")}
Write-Debug "Creating source cab object for $cab"
$sourceCab = $shell.Namespace($cab).items()
Write-Debug "Creating destination folder object for $destination"
@oliverrahner
oliverrahner / homekit.json
Created May 12, 2018 00:12
node-red flow for homekit with lights and window coverings
[
{
"id":"61e77a.fcbc8088",
"type":"tab",
"label":"Flow 1",
"disabled":false,
"info":""
},
{
"id":"3fa4c9db.c6a2ce",
#!/usr/bin/env python3
#
# SD Card Information
#
# By John Lane 2012-08-03
#
# References:
#
# 1: https://www.sdcard.org/downloads/pls/simplified_specs/Part_1_Physical_Layer_Simplified_Specification_Ver_3.01_Final_100518.pdf
# 2: http://www.kernel.org/doc/Documentation/mmc/mmc-dev-attrs.txt
@oliverrahner
oliverrahner / index.js
Last active April 9, 2024 11:00
Simple Node script showing details of TLS client certificate without a fixed set of accepted CAs
// prerequisites:
// dependency installation: npm i fs https express
// create server certificate: openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname"
// point your browser to https://localhost:8443
// this should allow you to select a certificate to use as the client cert, if you have any
// the server then returns some details about that certificate
const fs = require('fs');
const https = require('https');