Skip to content

Instantly share code, notes, and snippets.

@alirobe
alirobe / PostToUrlAsJson.cs
Last active March 25, 2024 14:41
Umbraco Forms Workflow - POST to URL as JSON (with optional Bearer Access Token). Just place this file anywhere in your Umbraco+Forms project, and the dependency injection will pick it up. This will allow you to connect to Microsoft Flow or Zapier or any integration web service, from which you can send to Salesforce/Dynamics/etc.
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Dynamic;
using System.Net;
using System.Text.RegularExpressions;
using Umbraco.Core.Logging;
using Umbraco.Forms.Core;
using Umbraco.Forms.Core.Attributes;

Fix absolutely positioned divs when people turn their phones sideways

The problem

In Safari, if you have a layout container that's absolutely positioned to take up, at a minimum, its whole container (which isn't unheard of in "appey" internet home page thingies) using CSS like this:

.absolutely
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Html;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
namespace Foo
{
@kevinthompson
kevinthompson / README.md
Last active June 27, 2017 20:29
Script for Displaying Images on #SIGNALconf Interactive Display

Notes

This requires you to have a few things:

  1. A Mac
  2. An iPhone
  3. A US Cell Phone Number
  4. Handoff Enabled on Your Mac/iPhone
  5. A generous text message plan
@barryokane
barryokane / umbraco.helper.sample.before.cshtml
Last active March 15, 2017 15:52
Simple example of using Razor @Helper in an Umbraco template. In this example we have some repeating HTML, using @Helper removes the duplication.
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = "Layout.cshtml";
}
<main>
<section id="content" class="offers">
@{
@danswick
danswick / README.md
Last active March 14, 2019 20:31
CSV on a GL map!

Using @tmcw's csv2geojson to add points from a CSV to a Mapbox GL JS map.

@anandthakker
anandthakker / index.html
Created September 22, 2015 21:56
Data driven style example with Mapbox GL
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.11.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.11.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@claushingebjerg
claushingebjerg / Nupickers xml picker xpath
Last active December 13, 2016 18:38
Nupickers xml picker xpath
Get all nodes of doctype below level 2
$ancestorOrSelf/ancestor-or-self::* [@level=2]//*[@isDoc][self::Kategori]
Get all nodes of doctype
//*[@isDoc][self::Kategori]
@claushingebjerg
claushingebjerg / Render custom LeBlender link to node datatype in grid, partial
Last active December 13, 2016 18:37
Render custom LeBlender link to node datatype in grid, partial
@mcmullengreg
mcmullengreg / twitterEmbed.cshtml
Created April 20, 2015 23:46
Embedded Twitter Feed for Umbraco
@* Embedded Twitter Feed
* ---------------------
* Create a widget from Twitter.com FIRST - https://twitter.com/settings/widgets
* Embedded Timeline API - https://dev.twitter.com/docs/embedded-timelines
* All of these settings are for the local end. User & Search information
* Should be setup on the actually widget creation page.
*
*
*@