Skip to content

Instantly share code, notes, and snippets.

View kgiszewski's full-sized avatar

Kevin Giszewski kgiszewski

View GitHub Profile
@kgiszewski
kgiszewski / fd.js
Last active September 13, 2017 19:06
var registerHandleFormSubmit = function() {
$("#landingPage form").submit(function (e) {
e.preventDefault();
var $form = $(this);
var $email = $form.find(".email");
var $section = $form.closest("section");
var $thankYou = $section.find(".thank-you");
var $error = $section.find(".error");
public class AboutUsModel : RenderModel
{
public IPublishedContent MainImage { get; }
public string MainImageUrl { get; }
public AboutUsModel(IPublishedContent content)
: base(content)
{
MainImage = Content.GetHeaderImage("mainImage");
@kgiszewski
kgiszewski / gist:13029e31bae8f994c7d802905cb44723
Created August 8, 2017 15:00
Powerful Vorto + Archetype combination
@if (Model.Content.HasVortoValue("content"))
{
var vortoContent = Model.Content.GetVortoValue("content");
var archetypeModel = vortoContent as ArchetypeModel;
if (archetypeModel != null)
{
@Html.RenderArchetypePartials(archetypeModel, "~/Views/Partials/Archetype/")
}
// the setup function runs once when you press reset or power the board
#include <SPI.h>
#include <Ethernet.h>
//define a constant that maps to pin 6
#define BLUE_PIN 6
//needs a mac address, just needs to be unique to your LAN
//you can make this number up
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
//begin vars
blog: {
assets: {
src: 'src/KGLLC.Blog/assets'
{
"name": "Name of your project",
"version": "0.0.0",
"author": "Your name",
"private": true,
"repository": {
"type": "git",
"url": ""
},
"devDependencies": {
@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off
:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.15
:: ----------------------
:: Prerequisites
:: -------------
using System;
using Umbraco.Core.Models;
using Umbraco.Web;
namespace KGLLC.Umbraco.Helpers
{
public static class PublishedContentExtensions
{
public static string ToPublishedDateLong(this IPublishedContent content)
{
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = "Base.cshtml";
}
@section FooterScripts {
<script src="/assets/scripts/jquery.parallax.js"></script>
}
<section id="main" class="about-me">
@inherits UmbracoViewPage<Archetype.Models.ArchetypeFieldsetModel>
@{
var colorClass = Model.GetValue<string>("color");
if (string.IsNullOrEmpty(colorClass))
{
colorClass = "primary"; //default
}
}