This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GetEventStoreRepository : IRepository | |
{ | |
private const string EventClrTypeHeader = "EventClrTypeName"; | |
private const string AggregateClrTypeHeader = "AggregateClrTypeName"; | |
private const string CommitIdHeader = "CommitId"; | |
private const int WritePageSize = 500; | |
private const int ReadPageSize = 500; | |
private readonly Func<Type, Guid, string> _aggregateIdToStreamName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Assumptions | |
# | |
# 1. If you have a Octopus release deployed, say 1.0.0.73, there is a git | |
# tag set for that commit in GitHub that is "v1.0.0.73". | |
# | |
# 2. You have TeamCity label each successful build in GitHub with the format | |
# "v{build number}. Sidenote: it appears that TeamCity only labels the | |
# default branch, but not feature branches. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start /wait msiexec /i Octopus.Tentacle.<version>.msi /quiet INSTALLLOCATION=C:\Octopus | |
cd C:\Octopus\Agent | |
tentacle configure --appdir="C:\Applications" --port=10933 --trust=<server-thumbprint> | |
tentacle new-certificate | |
tentacle install | |
tentacle register-with --server=<server-url> --environment=<environment> --role=<role> --apikey=<some-user-apikey> | |
octo deploy-release --project=<project-name> --deployto=<environment-to-deploy> --version=<version-to-deploy> --server=<server-url> --apikey=<some-user-apikey> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This is a sample NXLog configuration file created by Loggly. June 2013 | |
## See the nxlog reference manual about the configuration options. | |
## It should be installed locally and is also available | |
## online at http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html | |
## Please set the ROOT to the folder your nxlog was installed into, | |
## otherwise it will not start. | |
#define ROOT C:\Program Files\nxlog | |
define ROOT C:\Program Files (x86)\nxlog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.define "vagrant-windows" | |
config.vm.box = "windows2008r2" | |
# You should be using the vagrant-windows Vagrant Plugin! | |
# Admin user name and password | |
config.winrm.username = "Administrator" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Voron.Util | |
{ | |
/// <summary> | |
/// A list that can be used by readers as a true immutable read-only list | |
/// and that supports relatively efficient "append to the end" and "remove | |
/// from the front" operations, by sharing the underlying array whenever |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type CustomBinder() = | |
interface IModelBinder with | |
member this.BindModel(actionContext:HttpActionContext, bindingContext :ModelBindingContext) = | |
let qs = HttpUtility.ParseQueryString(actionContext.Request.RequestUri.Query) | |
bindingContext.Model <- | |
if (qs.AllKeys |> Seq.exists(fun q -> q.ToLower() = bindingContext.ModelName.ToLower())) then | |
qs.[bindingContext.ModelName] |> Some | |
else | |
None | |
true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("UPDATE AUG 2023: this script is beyond old and broken") | |
print("You may find interesting and more up to date resources in the comments of the gist") | |
exit() | |
from slacker import Slacker | |
import json | |
import argparse | |
import os | |
# This script finds all channels, private channels and direct messages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2016 BravoTango86 | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Generate EXIF GPS metadata | |
// Swift 3 | |
// Exif Version 2.2.0.0 supports decimal degrees | |
import Foundation | |
import CoreLocation | |
import ImageIO | |
extension CLLocation { |