Skip to content

Instantly share code, notes, and snippets.

View danieleli's full-sized avatar

Dan Schlossberg danieleli

View GitHub Profile
@danieleli
danieleli / SolutionSetup.txt
Created August 3, 2011 12:35
Chewie notes
Using the PowerShell Module or Package Manager Console
Using the module is not much different than the script itself except for a couple of changes.
To init a Chewie file once the module is imported you can :
PS>Initialize-Chewie
Once you import the module you can get can get chewie doing its thing by calling :
PS>Invoke-Chewie
@danieleli
danieleli / .gitIgnore
Created August 23, 2011 13:43
.gitignore for Visual Studio
#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
@danieleli
danieleli / gist:1171055
Created August 25, 2011 16:11
MSBuild template
<?xml version="1.0"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="BuildAndPublish"><PropertyGroup><SourceFileRootFolder>D:\Projects\SampleSite\Source</SourceFileRootFolder><ReleaseFolder>D:\Projects\SampleSite\Builds\Latest Build\Build</ReleaseFolder></PropertyGroup><ItemGroup>
<!-- This definition will be used below on the copy task -->
<SampleSiteBin Include="$(SourceFileRootFolder)\bin\**\*.*"/></ItemGroup>
<!-- Cleaning task -->
<Target Name="CleanTarget"><Message Text="Removing all source files from $(ReleaseFolder)"/><RemoveDir Directories="$(ReleaseFolder)\"/></Target>
<!-- Build and publish task -->
<Target Name="BuildAndPublish">
<!-- Building site -->
<MSBuild Targets="Clean;Build" Projects="$(SourceFileRootFolder)\SampleSite.sln"/><CallTarget Targets="CleanTarget"/>
@danieleli
danieleli / .NugetFile
Created September 19, 2011 00:34
Chewie .NugetFile
chew 'jQuery.vsdoc'
chew 'EntityFramework'
chew 'elmah'
chew 'MvcScaffolding'
chew 'MVCHtml5Toolkit'
chew 'DataAnnotationsExtensions.MVC3'
@danieleli
danieleli / global.cs
Created October 9, 2011 23:46
test global.cs
public class Global : System.Web.HttpApplication
{
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
}
void Application_End(object sender, EventArgs e)
@danieleli
danieleli / ResourceManifest.cs
Created October 16, 2011 21:50
Google Libraries Resource Manifest
public class ResourceManifest : IResourceManifestProvider {
static readonly string GOOGLE_ROOT = "//ajax.googleapis.com/ajax/libs/{0}/{1}/{2}";
public void BuildManifests(ResourceManifestBuilder builder) {
var manifest = builder.Add();
SetPath(manifest.DefineScript("jquery"), "1.5.2", "jquery.min.js", "jquery.js");
SetPath(manifest.DefineScript("jqueryui"), "1.8.11", "jquery-ui.min.js", "jquery-ui.js").SetDependencies("jquery");
SetPath(manifest.DefineScript("chrome-frame"), "1.0.2", "CFInstall.min.js", "CFInstall.js");
SetPath(manifest.DefineScript("dojo"), "1.6.0", "dojo.xd.js", "dojo.xd.js.uncompressed.js");
@danieleli
danieleli / .gitignore
Created October 21, 2011 15:13
Git Ignore File
#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
@danieleli
danieleli / XmlMemorySerializer.cs
Created October 26, 2011 21:06
In memory xml serializer utility
using System.Xml.Serialization;
using System.IO;
using System;
namespace SoftwareSingularity.Utility
{
public class XmlMemorySerializer
{
// TODO: Make this a generic class <T>
private const string NAMESPACE_PREFIX = "examplews";
@danieleli
danieleli / appsetting.cs
Created November 1, 2011 02:03
The world's great app setting retriever!
public class ApiSettings
{
public static ILog _logger = LogManager.GetLogger(typeof(ApiSettings));
// Use enums to prevent typos
public enum ConfigurationKeys
{
YesMailDomain,
YesMailUserName,
YesMailPassword,
@danieleli
danieleli / border-test.css
Created November 16, 2011 19:44
Vertical borders for variable height, centered content
body{ margin: 0; position: relative; }
.page-width { width: 960px; margin: 0 auto; }
/* BEGIN: side borders */
#border-wrapper {
z-index: 100;
position: absolute;
width: 100%;
height: 100%;