Skip to content

Instantly share code, notes, and snippets.

View agross's full-sized avatar
🔪
Sharpening the saw

Alexander Groß agross

🔪
Sharpening the saw
View GitHub Profile
public class Program
{
public static void Main(string[] args)
{
HostFactory.Run(x =>
{
x.Service<ClassThatHasStartAndStopMethods>(s =>
{
// optional, when you want an IoC to resolve deps.
s.ConstructUsing(settings => new MefBootstrapper(settings).Root);
Crashlog created at 2017-03-02 12:28:36 +0100
===== MESSAGE:
Errno::ENOENT: No such file or directory @ rb_file_s_size - /var/folders/c6/2ysv_j9j4hdgtzsnhrvflvtc0000gn/T/nanoc20170301-90191-10tx8nn/binary_items/1
===== ITEM BEING COMPILED:
Item identifier: /assets/images/1x1-pixel.png
Item rep name: :default
@agross
agross / git-cherry-pick-test
Created December 22, 2016 15:24
git cherry-pick adds more lines than expected
#!/bin/bash
git init
echo 1 > file
# This is the magic line.
echo * merge=union > .gitattributes
git add .
git commit -m 1
// Decompiled with JetBrains decompiler
// Type: NuGet.VersionUtility
// Assembly: NuGet.Core, Version=2.8.50313.46, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// MVID: 4404F95E-CF52-4857-811C-40FE351F2921
// Assembly location: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\i5o50bmq.ucl\NuGet.Core.dll
using NuGet.Resources;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

Keybase proof

I hereby claim:

  • I am agross on github.
  • I am agross (https://keybase.io/agross) on keybase.
  • I have a public key whose fingerprint is 1A67 F6C9 CFFC 5DE6 FA42 6E47 43B7 9496 F100 F776

To claim this, I am signing this object:

<!--
Add this to Notepad++'s userDefineLang.xml to get syntax highlighting for git commit and rebase messages.
You need to set up your git editor to rename e.g. COMMIT_EDITMSG to COMMIT_EDITMSG.git for this to work.
Here is an example how to do it:
https://github.com/agross/dotfiles/blob/a57ddcfbb653f13352c2a1077de6c13cb328e74e/git/editor-windows.zsh#L12
-->
<UserLang name="Git" ext="git" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="1" decimalSeparator="0" />
# %n == The full unit name, e.g. "nginx.service".
# %p == The unit's prefix, e.g. "nginx".
[Unit]
Description=Trigger cron for ownCloud
After=owncloud.service
# See http://northernlightlabs.se/systemd.status.mail.on.unit.failure
OnFailure=unit-status-mail@%n.service
[Service]
public interface IFormatter
{
string Format(Model model);
}
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Name;Age;City
Peter;42;New York
Paul;57;London
Mary;35;Munich
Jaques;66;Paris
Yuri;23;Moscow
Stefanie;47;Stockholm
Nadia;29;Madrid
@agross
agross / deploy.ps1
Last active December 20, 2015 18:48
$ErrorActionPreference = 'Stop'
$scriptPath = Split-Path -parent $MyInvocation.MyCommand.Definition
Import-Module "$scriptPath\tools\deployment-tools"
Import-Module "$scriptPath\bin\NServiceBus.PowerShell.dll"
$permissions = @{
'' = @{
"FullControl" = @(
$(ConvertTo-UserName([System.Security.Principal.WellKnownSidType]::BuiltinAdministratorsSid)),