Skip to content

Instantly share code, notes, and snippets.

View anderaus's full-sized avatar
👋

Anders Austad anderaus

👋
View GitHub Profile
namespace ConditionalRoute
{
[AttributeUsage(AttributeTargets.Class)]
public class ExposeInEnvironmentAttribute : Attribute
{
public string Environment { get; }
public ExposeInEnvironmentAttribute(string environment)
{
Environment = environment;
@JamesMenetrey
JamesMenetrey / README.md
Last active September 29, 2022 08:27
Install Oh-My-Zsh + iTerm2 with Solarized + System-wide console in 2017 (macOS)

Install iTerm2 with Solarized in 2017

Here is the looks and feel of your terminal once the tutorial has been applied on your system:

Install iTerm2

Using Homebrew:

@mirontoli
mirontoli / likescount.js
Last active December 18, 2015 16:08
Shows a count of likes where you can like or unlike a SharePoint Page
"use strict";
window.tolle = window.tolle || {};
tolle.utils = tolle.utils || {};
tolle.utils.renderLike = (function() {
var like = { item: undefined, container: undefined};
var onSuccess = function() {
var count = like.item.get_item("LikesCount") == null ? "0" : String(like.item.get_item("LikesCount"));
var likerLookupItems = like.item.get_item("LikedBy");
var likers = [];
if (likerLookupItems != null) {
@jonathanconway
jonathanconway / TypeExtensions.IsSimpleType.cs
Created August 12, 2012 08:09
Determine whether a type is simple.
public static class TypeExtensions
{
/// <summary>
/// Determine whether a type is simple (String, Decimal, DateTime, etc)
/// or complex (i.e. custom class with public properties and methods).
/// </summary>
/// <see cref="http://stackoverflow.com/questions/2442534/how-to-test-if-type-is-primitive"/>
public static bool IsSimpleType(
this Type type)
{