Skip to content

Instantly share code, notes, and snippets.

@Nordis
Nordis / custom-style.css
Created November 30, 2017 14:36
Hide navigation, Astra blog
/* Hide both previous and next links */
.post-navigation {
display:none!important;
}
/* Hide only previous link */
.post-navigation .nav-previous {
display:none!important;
}
@Nordis
Nordis / html-epi-form-extensions.cs
Created November 20, 2017 15:06
EPiServer 7 Language specific forms extension methods
public static MvcForm BeginFormWithCurrentLanguage(this HtmlHelper htmlHelper, string actionName, string controllerName, FormMethod method)
{
return htmlHelper.BeginFormWithCurrentLanguage(actionName, controllerName, new object(), method, new object());
}
public static MvcForm BeginFormWithCurrentLanguage(this HtmlHelper htmlHelper, string actionName, string controllerName, object routeValues, FormMethod method)
{
return htmlHelper.BeginFormWithCurrentLanguage(actionName, controllerName, routeValues, method, null);
}
@Nordis
Nordis / example.cs
Last active November 20, 2017 15:03
Manual EPiServer 7 Language Specific Form
@using (Html.BeginForm("SubMitting", "Test", new {language= ContentLanguage.PreferredCulture.Name}))
{
}
@Nordis
Nordis / project.json
Created April 1, 2016 18:40
Missing references, asp.net core
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},
"tooling": {
"defaultNamespace": "test1"
},
"dependencies": {
dnx --version:
Microsoft .NET Execution environment
Version: 1.0.0-rc1-16231
Type: Mono
Architecture: x64
OS Name: Darwin
OS Version: 10.11
Runtime Id: osx.10.11-x64
dnu --version:
@Nordis
Nordis / DevLunch-Azure-Table-Storage.cs
Last active March 1, 2016 16:51
Visar upp hur man enkelt jobbar med Azure Table Storage.
void Main()
{
var connectionString = "DefaultEndpointsProtocol=https;AccountName=;AccountKey=";
var storageAccount = CloudStorageAccount.Parse(connectionString);
var tableClient = storageAccount.CreateCloudTableClient();
var personTable = tableClient.GetTableReference("people");
personTable.CreateIfNotExists();
CreateLotsOfPeopleOneByOne(personTable);
@Nordis
Nordis / dabblet.css
Created July 23, 2014 11:19
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body {
background: #666;
min-height: 100%;
}
.discount {
@Nordis
Nordis / dabblet.css
Created July 7, 2014 12:37
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
#transtest {
width: 50px;
height: 50px;
background: linear-gradient(45deg, #f06, yellow);
transition: all 1s ease-in-out;
transition-property: width, margin-left;
using System;
using MonoTouch.UIKit;
using Diet52App.Core.iOS;
namespace Diet52App
{
public class SearchDisplayDelegate : UISearchDisplayDelegate
{
SearchViewModel searchViewModel;
using System;
using MonoTouch.UIKit;
using Diet52App.Core.iOS;
namespace Diet52App
{
public class SearchDisplayDelegate : UISearchDisplayDelegate
{
SearchViewModel searchViewModel;