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">
CMCDragonkai /
Last active Jun 28, 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>
jbenet /
Last active Jul 27, 2022
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.

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()
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)]
# see
# core
brew install coreutils
# key commands
brew install binutils
brew install diffutils
brew install ed --default-names
brew install findutils --with-default-names
remarkablemark / Dockerfile
Last active Aug 10, 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 \
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)
sbinlondon /
Last active Aug 10, 2022
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)"