Skip to content

Instantly share code, notes, and snippets.

View williamoconnorme's full-sized avatar
☁️

William williamoconnorme

☁️
View GitHub Profile
@williamoconnorme
williamoconnorme / Podfile
Created September 14, 2017 16:05
PopcorntimeTV xCode 9 podfile
use_frameworks!
source 'https://github.com/CocoaPods/Specs'
source 'https://github.com/PopcornTimeTV/Specs'
def pods
pod 'PopcornTorrent', '~> 1.1.13'
pod 'XCDYouTubeKit', '~> 2.5.5'
pod 'Alamofire', '~> 4.4.0'
pod 'AlamofireImage', '~> 3.2.0'
@williamoconnorme
williamoconnorme / openTwitterFunc.swift
Last active July 18, 2023 19:32
Open the twitter app from your own app using Swift
func openOnTwitter() {
let screenName = "jack"
let appURL = URL(string: "twitter://user?screen_name=\(screenName)")!
let webURL = URL(string: "https://twitter.com/\(screenName)")!
let application = UIApplication.shared
if application.canOpenURL(appURL) {
application.open(appURL, options: [:], completionHandler: nil)
} else {
@williamoconnorme
williamoconnorme / ireland-eircode-routing-keys.json
Created February 20, 2021 18:47
Routing keys for Eircodes in Ireland
[
{
"name": "A45",
"description": "OLDTOWN"
},
{
"name": "A67",
"description": "WICKLOW"
},
{
@williamoconnorme
williamoconnorme / Configure-ServiceFabricAuth.ps1
Created July 28, 2023 10:10
This script will allow you to use DefaultAzureCredential locally with your service fabric cluster. It uses PsExec to login the NETWORK SERVICE Account using the AZ CLI. This caches the token credential for the service account
<#
.SYNOPSIS
This script uses PsExec to run a PowerShell command for Azure CLI login as the NETWORK SERVICE account using device code authentication.
#>
$user = [Security.Principal.WindowsIdentity]::GetCurrent();
$isAdmin = (New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
if ($isAdmin) {
Write-Warning "This script will install set an Azure CLI login token for the NETWORK SERVICE account. Continue?" -WarningAction Inquire