Skip to content

Instantly share code, notes, and snippets.

View brendan-rice's full-sized avatar

Brendan Rice brendan-rice

View GitHub Profile
using System;
using Umbraco.Core;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.DatabaseAnnotations;
namespace Umbraco.Examples
{
/// <summary>
/// Class that shows the use of creating a new table and inserting a new ArticlePoco.
/// This class is only intended for demo'ing and should not be used as it.
@SidShetye
SidShetye / StripeWebhookController.cs
Created October 25, 2012 04:36
Receiving Stripe.com's Webhooks in ASP.NET C#, MVC4
using System;
using System.IO;
using System.Web;
using System.Web.Mvc;
using Stripe; // you need this library https://github.com/jaymedavis/stripe.net
using System.Net;
namespace StripeSampleMVC.Controllers
{
public class StripeWebhookController : Controller
@havvg
havvg / ajax-form.js
Created August 1, 2012 13:20
jQuery AJAX form submit with Twitter Bootstrap modal
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
@hkirsman
hkirsman / mobtable.html
Created June 27, 2012 08:34
turn tables into mobile friendly
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="et">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>table</title>
<style type="text/css">
.odd { background-color: #808080; }
.generated_for_mobile { margin-bottom: 30px }
@joeriks
joeriks / Comment.cshtml
Created March 19, 2011 16:51
Basic Umbraco Razor commentary form
@using umbraco.cms.businesslogic.web
@* A Razor script to add a basic comment function to Umbraco pages
You need a document type called Comment with a textstring property
called commentName and a textbox multiple property called commentMessage
You also need to allow the Comment document type as child document type
to your textpage document type.
Create this script with a macro and add it below the bodyText in your
template(s) *@
@rarous
rarous / Deploy.ps1
Created September 14, 2010 14:06
Script for packaging and deployment of ASP.NET applications to IIS via Web Deploment Tools
Properties {
$Build_dir = Split-Path $psake.build_script_file
$Packages_dir = Join-Path $build_dir 'Packages'
$MsDeploy_dir = Join-Path $env:ProgramFiles 'IIS\Microsoft Web Deploy'
$SiteName = 'www.example.com'
$Package = "$SiteName.zip"
$Dest = 'hosting.com'
$UserName = 'IIS User Name'
$Pwd = 'Secret Password'