Skip to content

Instantly share code, notes, and snippets.

View csharpforevermore's full-sized avatar
🏠
Working from home

Randle csharpforevermore

🏠
Working from home
View GitHub Profile
@dalager
dalager / gist:842109
Created February 24, 2011 12:27
Log.cs - log4net wrapper
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using log4net;
using log4net.Config;
namespace Core
{
/// <summary>
@mahdi
mahdi / .gitignore
Created August 2, 2011 08:10
A .gitignore file for a .NET developer
#Junk Files
*.DS_Store
[Tt]humbs.db
#Visual Studio Files
[Oo]bj
[Bb]in
[Dd]ebug
[Bb]uild/
*.user
@DavidWittman
DavidWittman / python-nested_list_comprehensions.md
Created July 26, 2012 20:08
Nested list comprehensions in Python

Nested list comprehensions in Python

For some reason or another, I'm always second guessing myself when writing nested list comprehensions. Here's a quick example to clarify what's going behind the scenes:

>>> words = ["foo", "bar", "baz"]
>>> [letter for word in words for letter in word]
['f', 'o', 'o', 'b', 'a', 'r', 'b', 'a', 'z']
@indyfromoz
indyfromoz / aspnet-mvc.gitignore
Created November 19, 2012 06:44
.Gitignore for ASP.NET MVC
###################
# compiled source #
###################
*.com
*.class
*.dll
*.exe
*.pdb
*.dll.config
*.cache
@kjelelokk
kjelelokk / dojo_epiComponent.cs
Created November 29, 2012 11:46
Dojo episerver component
using EPiServer.Shell.ViewComposition;
using EPiServer.Shell.Web;
using EPiServer.Cms.Shell;
using EPiServer.Cms.Shell.UI;
namespace testepi7.MyWidgets
{
[Component(
PlugInAreas = "/episerver/cms/assets",
Categories = "cms",
anonymous
anonymous / MemberLogin.cshtml
Created December 19, 2012 11:47
A Umbraco 4.10+ SurfaceController based Login Form
@model UmbracoLogin.MemberLoginModel
@if (User.Identity.IsAuthenticated)
{
<p>Logged in: @User.Identity.Name</p>
<p>@Html.ActionLink("Log out", "MemberLogout", "MemberLoginSurface")</p>
}
else
{
using (Html.BeginUmbracoForm("MemberLogin", "MemberLoginSurface"))
{
@model UmbracoLogin.MemberLoginModel
@if (User.Identity.IsAuthenticated)
{
<p>Logged in: @User.Identity.Name</p>
<p>@Html.ActionLink("Log out", "MemberLogout", "MemberLoginSurface")</p>
}
else
{
using (Html.BeginUmbracoForm("MemberLogin", "MemberLoginSurface"))
{
@samyakbhuta
samyakbhuta / JavascriptReferences.md
Last active June 1, 2018 00:42
#javascript #reference
@sphingu
sphingu / MVC_InterView_Questions.md
Created June 19, 2013 09:18
MVC Interview Questions

Interview Question


1.In which assembly is the MVC framework defined? System.Web.Mvc

2.What is ViewData, ViewBag and TempData?

  MVC offers Three options for passing data from controller to View and  in next request. 
ViewData & ViewBag are almost similar.
  	Short life means value becomes null when redirection occurs.
		It’s a communication mechanism within the server call.
Difference between ViewBag & ViewData:
@eyston
eyston / controller.js
Created June 24, 2013 17:11
angular typeahead
angular.module('ymusica').controller('AlbumSearch', ['$scope', 'Albums', 'Artists', '$q', function($scope, albums, artists, $q) {
$scope.albums = [];
$scope.artists = [];
var terms = new Rx.Subject();
$scope.searchMusic = terms.onNext.bind(terms);
terms.sample(250)