This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Check that the request is coming from my site. | |
if (!isset($_SERVER['HTTP_REFERER']) || !stristr(strtolower($_SERVER['HTTP_REFERER']), strtolower($_SERVER['SERVER_NAME']))) { | |
http_response_code(403); | |
exit; | |
} | |
// There has to be a URL provided in the query string. | |
if (!isset($_GET['url'])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Code Sandbox</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
body { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Umbraco.Cms.Core; | |
using Umbraco.Cms.Core.Composing; | |
using Umbraco.Cms.Core.Migrations; | |
using Umbraco.Cms.Core.Scoping; | |
using Umbraco.Cms.Core.Services; | |
using Umbraco.Cms.Infrastructure.Migrations; | |
using Umbraco.Cms.Infrastructure.Migrations.Upgrade; | |
namespace Umbraco.Community.Migrations; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# statup umbraco, and add some packages if you want | |
# | |
# e.g numbraco MyTestSite uSync Jumoo.TranslationManager vendr -NoStarter | |
# | |
# extras!!! | |
# | |
# open vscode in the folder as part of the build | |
# numbraco MyTestSite -code | |
# | |
# don't run the site |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dotnet new umbraco -n UmbracoUnattended --connection-string "Server=GORDON\SQLExpress;Database=UmbracoUnattended;User Id=sa;Password=abc123;" | |
cd UmbracoUnattended | |
Set-Item Env:\UMBRACO__CMS__GLOBAL__INSTALLMISSINGDATABASE true | |
Set-Item Env:\UMBRACO__CMS__UNATTENDED__INSTALLUNATTENDED true | |
Set-Item Env:\UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERNAME "Test" | |
Set-Item Env:\UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL "[email protected]" | |
Set-Item Env:\UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD "test123456" | |
dotnet add package Umbraco.TheStarterKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace YourCode | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Umbraco.Community.Contentment.DataEditors; | |
using Umbraco.Core.Logging; | |
using Umbraco.Core.PropertyEditors; | |
using Umbraco.Core.Services; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using nuPickers.Shared.DotNetDataSource; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using Umbraco.Core; | |
using Umbraco.Core.Models; | |
using Umbraco.Web; | |
namespace Outfield.Digital.DataSources | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web.Mvc; | |
using Umbraco.Community.Contentment.DataEditors; | |
using Umbraco.Core.PropertyEditors; | |
using Umbraco.Web; | |
namespace MyWebsite.DataSources | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--ALL UNPUBLISHED CONTENT (COMPLETELY UNPUBLISHED) | |
SELECT un.id, un.text FROM umbracoNode un | |
INNER JOIN cmsDocument cd ON un.id = cd.nodeId | |
WHERE cd.newest = 1 AND cd.published = 0 | |
AND (SELECT COUNT(a.nodeId) FROM cmsDocument a WHERE a.nodeId = un.id AND a.published = 1 AND a.newest = 0) = 0 | |
--ALL UNPUBLISHED CONTENT (COMPLETELY UNPUBLISHED), EXCLUDING DELETED ITEMS | |
SELECT un.id, un.text FROM umbracoNode un | |
INNER JOIN cmsDocument cd ON un.id = cd.nodeId | |
WHERE cd.newest = 1 AND cd.published = 0 AND un.path NOT LIKE '%-21,%' |
NewerOlder