This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static string GetDropboxPath() { | |
string appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); | |
string dbPath = Path.Combine(appDataPath, "Dropbox\\host.db"); | |
if (!File.Exists(dbPath)) return null; | |
string[] lines = File.ReadAllLines(dbPath); | |
return Encoding.UTF8.GetString(Convert.FromBase64String(lines[1])); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage | |
@using Bjerner.Website.Web | |
@{ | |
Layout = null; | |
RssFeed feed = new RssFeed { | |
Title = "Bjerner.dk Blog", | |
Link = "http://blog.bjerner.dk/", | |
PubDate = DateTime.Now, | |
}; | |
foreach (IPublishedContent child in Model.Content.Children.OrderByDescending(x => x.CreateDate).Take(20)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Xml.Linq; | |
namespace Bjerner.Website.Web { | |
public class RssFeed { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Skybrud.Social.OAuth; | |
using Skybrud.Social.Twitter; | |
using Skybrud.Social.Twitter.OAuth; | |
using Skybrud.Social.Twitter.Objects; | |
namespace Skybrud.Social.Test.Twitter { | |
public partial class OAuth : System.Web.UI.Page { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Skybrud.Social.OAuth; | |
using Skybrud.Social.Twitter; | |
using Skybrud.Social.Twitter.OAuth; | |
using Skybrud.Social.Twitter.Objects; | |
namespace Skybrud.Social.Test.Twitter { | |
public partial class OAuth : System.Web.UI.Page { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the raw string | |
string response = service.Methods.Raw.Me(); | |
// Parse the JSON | |
JsonObject obj = JsonObject.ParseJson(response); | |
// Parse the JSON object (use as normal) | |
FacebookMeResponse me = FacebookMeResponse.Parse(obj); | |
// Get email |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private string FormatStatusMessageText(TwitterStatusMessage tweet) { | |
// Normally we should be able to call tweet.Entities.GetAllReversed() but that method | |
// will throw an exception if the array of media entities is NULL (which it is if there | |
// are no media attached to the tweet). | |
List<TwitterBaseEntity> entities = new List<TwitterBaseEntity>(); | |
entities.AddRange(tweet.Entities.HashTags); | |
entities.AddRange(tweet.Entities.Urls); | |
entities.AddRange(tweet.Entities.Mentions); | |
if (tweet.Entities.Media != null) entities.AddRange(tweet.Entities.Media); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Mvc.Html; | |
namespace Skybrud.Umbraco.ExtensionMethods { | |
public static class HtmlHelperExtensionMethods { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('umbraco').controller('GoogleAddressSearchController', ['$scope', '$http', function ($scope, $http) { | |
if (!$scope.model.address) $scope.model.address = ''; | |
$scope.address = $scope.model.address; | |
$scope.suggestions = []; | |
$scope.addressKeyDown = function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ParentPage { | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public string Url { get; set; } | |
public IEnumerable<TestPage> Pages { get; set; } | |
OlderNewer