Skip to content

Instantly share code, notes, and snippets.

OdeToCode / gist:5024867
Last active Dec 14, 2015
AngularJS Snippet
View gist:5024867
<div ng-app="videoApp" ng-controller="VideoController">
<tr data-id="{{video.Id}}" ng-repeat="video in videos">
View GetEventStoreSubscriptionDispatcher.cs
public class GetEventStoreSubscriptionDispatcher
private const string EventClrTypeHeader = "EventClrTypeName";
private readonly IBus bus;
private readonly IEventStoreConnection eventStoreConnection;
private readonly MongoDatabase mongoDatabase;
private static readonly JsonSerializerSettings SerializerSettings;
static GetEventStoreSubscriptionDispatcher()
warappa / AppDbContext.cs
Last active Jun 17, 2019
Using global value converters with Entity Framework Core 2.2.5. Based on Andrew Lock's StronglyTypedIdValueConverterSelector
View AppDbContext.cs
using Microsoft.EntityFrameworkCore;
namespace GlobalValueConverterSample
public class AppDbContext : DbContext
public AppDbContext(DbContextOptions<AppDbContext> options)
: base(options)
jen20 / MessageIdentity.cs
Created Aug 19, 2014
Generator for deterministic GUIDs
View MessageIdentity.cs
public class MessageIdentity
public Guid NameSpace;
private readonly byte[] _namespaceBytes;
public MessageIdentity(Guid guidNameSpace)
NameSpace = guidNameSpace;
_namespaceBytes = guidNameSpace.ToByteArray();
ascjones / GetSystemFileCache.ps1
Created Jan 19, 2015
Windows File Cache Scripts
View GetSystemFileCache.ps1
$source = @"
using System;
using System.Runtime.InteropServices;
namespace MyTools
public static class cache
[DllImport("kernel32", SetLastError = true, CharSet = CharSet.Unicode)]
CMCDragonkai /
Last active Nov 8, 2022
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
remarkablemark / Dockerfile
Last active Dec 1, 2022
Install node and npm with nvm using Docker.
View Dockerfile
# set the base image to Debian
FROM debian:latest
# replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# update the repository sources list
# and install dependencies
RUN apt-get update \
# see
# core
brew install coreutils
# key commands
brew install binutils
brew install diffutils
brew install ed --default-names
brew install findutils --with-default-names
jbenet /
Last active Jan 23, 2023
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

sbinlondon /
Last active Jan 28, 2023
Get the synth wave glow theme working for VS Code on Mac

Get the synth wave glow working for VS Code on Mac

These notes are pretty much the same steps as the two extensions list, it's just that I had to collate them together because neither seems to list it fully in the proper order.

  1. Install Synthwave ’84/Synthwave + Fluoromachine theme on VS Code (I used the Fluoromachine one)

  2. Install Custom CSS and JS Loader

  3. Command + Shift + P to open command palette > "Preferences: Open settings (JSON)"