Skip to content

Instantly share code, notes, and snippets.

View davidisnotnull's full-sized avatar
🛠️
On contract

David Johnson davidisnotnull

🛠️
On contract
View GitHub Profile
@davidisnotnull
davidisnotnull / git-commands.txt
Last active April 10, 2020 13:21
Useful Git Commands
# Stages all uncommited files to local
git add -A
# Adds a commit message to the local staged files
git commit -m "Commit message"
# Pushes the locally staged files to the remote repo
git push origin
# Cleans up local branches from the remote
@LucGosso
LucGosso / SubscriptionComponentController.cs and Subscription.js
Last active February 5, 2018 23:33
Episerver Component Gadget for administrating user subscriptions
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Web.Profile;
using EPiServer.Personalization;
using EPiServer.Shell.ViewComposition;
namespace Gosso.Episerver.Plugins.Gadget
{
define([
"dojo/_base/array",
"dojo/_base/connect",
"dojo/_base/declare",
"dojo/_base/lang",
"dijit/_CssStateMixin",
"dijit/_Widget",
"dijit/_TemplatedMixin",
"dijit/_WidgetsInTemplateMixin",

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@korof
korof / gist:8675597
Created January 28, 2014 20:25
jQuery: Sort a list alphabetically
$(function() {
$.fn.sortList = function() {
var mylist = $(this);
var listitems = $('li', mylist).get();
listitems.sort(function(a, b) {
var compA = $(a).text().toUpperCase();
var compB = $(b).text().toUpperCase();
return (compA < compB) ? -1 : 1;
});
$.each(listitems, function(i, itm) {