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
@agross
agross / CommandBarRecursion.vb
Created September 2, 2010 09:22
A Visual Studio macro that exports key bindings for ReSharper and a set of custom bindings
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics
Imports System.Collections.Generic
' Comment the following line if you're running the macro in Visual Studio .NET 2003.
Imports Microsoft.VisualStudio.CommandBars
Class CommandBarRecursion
if(GetMediaState() == State_Running && !m_fAudioOnly)
{
UINT fSaverActive = 0;
if(SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, (PVOID)&fSaverActive, 0))
{
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 0, 0, SPIF_SENDWININICHANGE); // this might not be needed at all...
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, fSaverActive, 0, SPIF_SENDWININICHANGE);
}
fSaverActive = 0;
MSDeploy.run \
:tool => configatron.tools.msdeploy,
:log_file => configatron.deployment.logfile,
:verb => :sync,
:allowUntrusted => true,
:source => Dictionary[:dirPath, configatron.dir.for_deployment.to_absolute.escape],
:dest => remote_for(role).merge({
# For now, we always deploy the full package.
:dirPath => configatron.deployment.root
}),
using System;
using System.Collections.Generic;
using System.Linq;
using Magnum.CommandLineParser;
using Magnum.Monads.Parser;
using SearchQueryParser;
namespace ParserCombinator
#!/bin/sh
function set_pattern()
{
case $1 in
add)
local r='^.M'
local c='git add --'
;;
new)
#!/usr/bin/env ruby
USAGE = <<EOH
Usage: git-quick [add|new|rm|checkout|head] index [, index, ...]
Where index is the line number in the output of `git status`, starting at 1.
The index starts at 1 for each of the "changes to be committed",
"changed but not updated" and "untracked files" sections.
EOH
<CodeStyleSettings>
<Naming2>
<UserRule Inspect="True" Prefix="" Suffix="" Style="Aa_bb" StaticnessKind="Static, Instance" AccessRight="Public" Description="MSpec contexts">
<ElementKinds>
<Kind Name="Machine.Specifications_Context" />
</ElementKinds>
</UserRule>
<UserRule Inspect="True" Prefix="" Suffix="" Style="aa_bb" StaticnessKind="Instance" AccessRight="Private, Protected, ProtectedInternal, Internal, Public" Description="MSpec supporting fields">
<ElementKinds>
<Kind Name="Machine.Specifications_Behavior" />
@agross
agross / gist:750367
Created December 21, 2010 18:55
.gitignore
# Lines that start with '#' are comments.
bin
Bin
obj
*.bak
*.*scc
*.suo
*.xsx
*.xss
@agross
agross / gist:764657
Created January 4, 2011 11:05
HybridLifestyleManager.cs
using System.Web;
using Castle.MicroKernel;
using Castle.MicroKernel.Lifestyle;
namespace FubuMVC.Container.Castle.ForIoC
{
public class HybridLifestyleManager : AbstractLifestyleManager
{
readonly PerThreadLifestyleManager _perThread;
agross@AXL /scratch
$ mkdir foo
agross@AXL /scratch
$ cd foo && git init
Initialized empty Git repository in /scratch/foo/.git/
agross@AXL /scratch/foo @master^
$ touch a && git add --all && git commit -m "a"
[master (root-commit) 41ab6cf] a