Skip to content

Instantly share code, notes, and snippets.

@KyleGobel
KyleGobel / gradient.scss
Created October 16, 2013 19:37
Gradient SASS Mixin
@mixin gradient($from, $to) {
/* fallback/image non-cover color */
background-color: $from;
/* Firefox 3.6+ */
background-image: -moz-linear-gradient($from, $to);
/* Safari 4+, Chrome 1+ */
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to));
@KyleGobel
KyleGobel / AccountController.cs
Created October 16, 2013 11:06
Account Controller for EZCP
public class AccountController : Controller
{
public IFormsAuthenticationService FormsService { get; set; }
public IMembershipService MembershipService { get; set; }
protected override void Initialize(RequestContext requestContext)
{
if (FormsService == null) { FormsService = new FormsAuthenticationService(); }
if (MembershipService == null) { MembershipService = new AccountMembershipService(); }
namespace Deerso.Domain.Models
{
public class CategoryFullPath
{
public CategoryFullPath()
{
}
public int Id { get; set; }
public string Name { get; set; }
@KyleGobel
KyleGobel / CategoryFullPathRepository.cs
Created October 14, 2013 20:03
View From Entity Framework
public class CategoryFullPathRepository : ICategoryFullPathRepository
{
protected DbContext DbContext { get; set; }
public CategoryFullPathRepository(DbContext dbContext)
{
DbContext = dbContext;
}
public IEnumerable<CategoryFullPath> GetAllPaths()
{
return DbContext.Database.SqlQuery<CategoryFullPath>("SELECT * FROM [Main].[Catalog].[vCategoryFullPath]");
@KyleGobel
KyleGobel / icons.css
Created October 10, 2013 18:14
Search Icon
.icon-searchglass {
font-family: 'deersoIcons';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
}
@KyleGobel
KyleGobel / 0_reuse_code.js
Created October 4, 2013 13:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console