Skip to content

Instantly share code, notes, and snippets.

View greystate's full-sized avatar
:octocat:
Octocatering

Chriztian Steinmeier greystate

:octocat:
Octocatering
View GitHub Profile
# MAC manipulators
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`'
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE'
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#x00A0;">
]>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
xmlns:ps="urn:percipientstudios-com:xslt"
/**
* Flexible multiline form with generated line breaks
*/
form {
width: 100px;
padding: 5px 210px 5px 5px;
border: 3px #ccc double;
text-align: right;
line-height: 2;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:Examine="urn:Examine"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets Examine "
>
@greystate
greystate / entities.xml
Last active January 4, 2016 05:59 — forked from uniquelau/sitemapfun.xsl
Here's my little fun version... :)
<!DOCTYPE xsl:stylesheet [
<!ENTITY DefaultPriority "metaSitemapPriority[normalize-space()] | $defaults/metaSitemapPriority[not(normalize-space(current()/metaSitemapPriority))]">
<!ENTITY DefaultChangeFreq "metaSitemapChangeFreq[normalize-space()] | $defaults/metaSitemapChangeFreq[not(normalize-space(current()/metaSitemapChangeFreq))]">
]>
body {
-webkit-font-smoothing:antialiased;
font:normal .8764em/1.5em HelveticaNeue-Light,Helvetica,Arial,sans-serif;
margin:0;
}
html > body {
font-size:1em;
padding:1em;
}
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png">
<!-- For the iPad mini and the first- and second-generation iPad on iOS ≤ 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-72x72-precomposed.png">
<!-- For the iPad mini and the first- and second-generation iPad on iOS ≥ 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="apple-touch-icon-76x76-precomposed.png">
<!-- For iPhone with high-resolution Retina display running iOS ≤ 6: -->
public class CompanyViewModel {
// use partial view "StreetAddress.cshtml"
public StreetAddress MainAddress {get; set;}
// use partial view "CompactAddress.cshtml"
[UIHint("CompactAddress")]
public StreetAddress StoreAddress {get; set;}
@greystate
greystate / VortoPropertyIndexer.cs
Last active August 29, 2015 14:06 — forked from darrenferguson/VortoPropertyIndexer
(Forked only to rename file for getting syntax highlighting — I have no C# skills to otherwise improve the code 🙈 :-)
using System.Collections.Generic;
using Moriyama.Library.Architecture;
using Newtonsoft.Json;
namespace Application.Search
{
public class VortoPropertyIndexer
{
// Somewhere in startup
//ExamineManager.Instance.IndexProviderCollection["ExternalIndexer"].GatheringNodeData += MoriyamaApplicationEventHandlerGatheringNodeData;
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@using Archetype.Models;
@using Archetype.Extensions;
@{
Layout = null;
}
//use case #1 - Covers a single Archetype
@foreach (var fieldset in Model.Content.GetPropertyValue<ArchetypeModel>("a1"))
{