Skip to content

Instantly share code, notes, and snippets.

View anth12's full-sized avatar

Anthony Halliday anth12

  • Fat Media
  • United Kingdom
View GitHub Profile
{
"openapi": "3.1.0",
"info": {
"description": "App Services provides an API for programmatically performing\nadministrative tasks outside of the App Services UI. This includes tasks such\nas modifying authentication providers, creating rules, and defining\nfunctions. Client applications should not use the admin API. Instead,\nuse one of the Client SDKs for tasks like authenticating users, calling\nfunctions, and interacting with services.\n\n## Project & Application IDs\n\n**Note**: The terms _Project ID_ and _Group ID_ are interchangeable.\n\nApp Services APIs frequently require two parameters: your Atlas _Project/Group\nID_, and your App Services _Application ID_.\n\n### Project ID\n\nYou can find your Project ID from the MongoDB Atlas dashboard or CLI.\n\n### Application ID\n\nTo find an Application ID, make a request to the App Services [GET /groups/{groupid}/apps](#operation/adminListApplications)\nAPI endpoint.\n\nThis request has the following format, referencing the `access_token`\nand the Gr
/*
MIT License
Copyright (c) 2018 Anthony Halliday
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@anth12
anth12 / Corrupt Vorto Documents.sql
Last active March 3, 2017 08:44
Umbraco Scripts
SELECT contentNodeId
FROM cmsPropertyData AS PD
INNER JOIN cmsPropertyType AS PT
ON PD.propertytypeid = PT.id
WHERE PD.versionId IN (
SELECT versionId
FROM [cmsDocument] AS D
; "WIN + LEFT" for previous
#Left::Media_Prev
; "WIN + RIGHT" for next
#Right::Media_Next
; "WIN + SPACE" for pause
#Space::Media_Play_Pause
@anth12
anth12 / Template-Project-Configuration.ps1
Last active October 3, 2024 09:27
Replaces all instances (file name and contents) of 'X' with 'Y'. Used for template project config.
$match = Read-Host "What would you like to replace?"
$replacement = Read-Host "And what would you like '"$match"' replacing with?"
$files = Get-ChildItem $(get-location) -filter *$match* -Recurse
$files |
Sort-Object -Descending -Property { $_.FullName } |
Rename-Item -newname { $_.name -replace $match, $replacement } -force
@anth12
anth12 / VideoEmbedder.html
Created August 12, 2014 10:18
Umbraco embedded video 'Data Type'
<div ng-controller="VideoEmbedderController">
<label>Video URL:</label>
<input type="text" ng-model="model.rawUrl" ng-change="update()"/>
<br/>
<label>Video Code:</label>
<span ng-bind="model.code"></span>
<div class="preview" ng-bind-html-unsafe="model.value">
@anth12
anth12 / dayOfWeek.Filter.js
Last active August 29, 2015 14:05
AngularJS Day of week filter
angular.module('example').filter('dayOfWeek', function() {
return function(dayIndex) {
switch(dayIndex) {
case 0:
return 'Sunday';
case 1:
return 'Monday';
case 2:
return 'Tuesday';
case 3: