Skip to content

Instantly share code, notes, and snippets.

View smdooley's full-sized avatar

Sean Dooley smdooley

View GitHub Profile
@smdooley
smdooley / umbPermissions
Last active December 14, 2015 08:09
Umbraco folder permissions Setting Permissions for ApplicationPoolIdentity More secure: change "NETWORK SERVICE" to "IIS APPPOOL\{application-pool-name}" Less secure: change "NETWORK SERVICE" to "IIS_IUSRS"
REM Following line in original script incorrectly sets all child folder permissions
REM icacls . /grant "NETWORK SERVICE":(OI)(CI)M
icacls app_code /grant "NETWORK SERVICE":(OI)(CI)RX
icacls app_browsers /grant "NETWORK SERVICE":(OI)(CI)RX
icacls app_data /grant "NETWORK SERVICE":(OI)(CI)M
icacls bin /grant "NETWORK SERVICE":(OI)(CI)R
icacls config /grant "NETWORK SERVICE":(OI)(CI)M
icacls css /grant "NETWORK SERVICE":(OI)(CI)M
icacls data /grant "NETWORK SERVICE":(OI)(CI)M
icacls masterpages /grant "NETWORK SERVICE":(OI)(CI)M
if (fuImage.HasFile)
{
PostedMediaFile postedMediaFile = new PostedMediaFile
{
ContentLength = fuImage.PostedFile.ContentLength,
ContentType = fuImage.PostedFile.ContentType,
FileName = fuImage.PostedFile.FileName,
InputStream = fuImage.PostedFile.InputStream
};
Media media = MediaFactory.GetMediaFactory(-1, postedMediaFile, new umbraco.BusinessLogic.User(0)).HandleMedia(-1, postedMediaFile, new umbraco.BusinessLogic.User(0), true);
Images
btn- - button images
tab- - tab images
bkg- - background images
-up - in-active button state
-down - active button state
-hover - hover button state
@2x - standard suffix for retina display graphics
@smdooley
smdooley / webdev
Last active December 20, 2015 23:18
Useful webdev sites
http://tympanus.net/codrops/
http://daneden.me/animate/
http://jobyj.in/api/ente-facebook-analytics-part-4-get-photos-the-user-is-tagged-in/
@smdooley
smdooley / Facebook JS SDK
Last active December 21, 2015 00:29
Example of Facebook JS SDK login and get profile picture
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@Page.Title - My ASP.NET Web Page</title>
<link href="~/Content/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" />
<link href="~/Content/Site.css" rel="stylesheet" type="text/css" />
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<script src="~/Scripts/jquery-1.7.1.min.js"></script>
<script src="~/Scripts/jquery-ui-1.8.20.js"></script>
## How to create a mobile accessible Facebook Page Tab App
In order to create a Page Tab App which has a mobile accessible version (an external website accessed directly, not via a Facebook iFrame). You need to add and configure 3 different "Platforms" in the app developer settings. These should be configured as follows:
### Page Tab
Configure this as you would normally.
Page Tab Name: the name you want to appear on the page tab
Page Tab Url: the url where you are hosting the page tab app (e.g. http://myapp.com/page-tab)
@smdooley
smdooley / UmbracoSortOrder
Created September 3, 2014 14:28
Sort Umbraco Nodes by sortOrder property
<xsl:sort select="@sortOrder" order="ascending" data-type="number" />
@smdooley
smdooley / Feed.ascx
Created September 30, 2014 18:36
Twitter Feed with caching
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LinqToTwitter;
using System.Text;
using System.Text.RegularExpressions;
@smdooley
smdooley / Project Dependencies
Created October 2, 2014 19:38
Visual Studio Project Structure
PROJECT NAME TOOL DEPENDENCIES PROJECT DEPENDENCIES
Company.Domain None None
Company.WebUI Ninject Company.Domain
Company.UnitTests Ninject Company.Domain
Moq Company.WebUI
PRESENTATION
View Models (Javascript)
Views (HTML/CSS)
Localiztation
WEB
Web API Controllers
MVC Controllers
APPLICATION