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
using System.Collections.Generic;
using System.IO;
using System.Net.Mail;
using System.Net.Mime;
using System.Text;
using Castle.Core.Smtp;
using NServiceBus;
# Write the history entry ourselves, as we empty $BUFFER it won't be written
# by zsh.
zle && [[ $HISTNO -eq $HISTCMD ]] && print -sr -- "$PREBUFFER$BUFFER"
# Save what would have been executed by .accept-line and empty out what zsh
# knows about the command entered.
EXEC=$BUFFER
BUFFER=
zle .accept-line
require 'configatron'
class Configatron::Store
def safe!
protect_all!
self << def to_s
name = "configatron.#{heirarchy}"
raise "Configuration key not found: #{name}" unless @_store.has_key?(sym)
end
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)),
class TeamCity
def self.running?
ENV.include? 'TEAMCITY_PROJECT_NAME'
end
def self.method_missing(method, *args, &block)
return unless running?
message_name = camel_case method.to_s
publish message_name, args[0]
@agross
agross / grid.sass
Created May 1, 2013 01:32
Sass sample
#container
+column(4)
+rem(padding, 0 10px)
margin: 0 auto
+respond-to(width-480)
+rem(padding, 0px)
+column(6)
+respond-to(width-768)
Build 'Samples :: MSpec-WPF' #3
Started 'Wed Mar 13 12:12:10 CET 2013' on 'AXL' by 'Alexander Groß'
Finished 'Wed Mar 13 12:12:13 CET 2013' with status 'NORMAL Tests passed: 2'
TeamCity URL http://build.home.therightstuff.de/viewLog.html?buildId=144906&buildTypeId=bt168
TeamCity server version is 8.0 EAP (build 26984)
[12:12:09]: bt168 (4s)
[12:12:09]: Checking for changes (running for 4s)
[12:12:29]: Publishing internal artifacts
[12:12:29]: [Publishing internal artifacts] Sending build.start.properties.gz file
Build 'Samples :: MSpec-WPF' #2
Started 'Tue Mar 12 18:15:53 CET 2013' on 'AXL' by 'Alexander Groß'
Finished 'Tue Mar 12 18:16:00 CET 2013' with status 'NORMAL Tests passed: 1'
TeamCity URL http://build.home.therightstuff.de/viewLog.html?buildId=144897&buildTypeId=bt168
TeamCity server version is 8.0 EAP (build 26984)
[18:15:53]: bt168 (7s)
[18:15:53]: Checking for changes (running for 7s)
[18:16:12]: Publishing internal artifacts
[18:16:12]: [Publishing internal artifacts] Sending build.start.properties.gz file