Skip to content

Instantly share code, notes, and snippets.

@joshuaflanagan
joshuaflanagan / publish_nuget.rb
Created June 24, 2011 03:07
Example rake task that downloads CI artifacts to publish nuget packages to the official feed
desc "Downloads from CI and pushes nuget packages to the official feed"
task :release, [:package] do |t, args|
require 'open-uri'
release_path = "#{buildsupport_path}/nuget_release"
clean_dir release_path
# The @teamcity_build_id is a unique identifier for the build configuration (looks like "bt234"). You can usually figure it out from your project url
artifact_url = "http://teamcity.codebetter.com/guestAuth/repository/downloadAll/#{@teamcity_build_id}/.lastSuccessful/artifacts.zip"
puts "downloading artifacts from teamcity.codebetter.com"
artifact = open(artifact_url)
@chaliy
chaliy / Commit-Project.ps1
Created November 12, 2011 10:33
Commit to Mercurial with message from JIRA
# Usage
# Commit-Project ABB-499
# This command will commit with message from issue ABB-499
# Commit-Project ABB-499 "Foo bar"
# This command will commit with message from issue ABB-499 and "Foo bar" at the end
#
# Script may once ask you JIRA url, your user name and password.
# You can use -Verbose modifier to get more details what script do
# Requires PsGet http://psget.net/
@kpol
kpol / TagGeneratorPlugin.cs
Created October 2, 2012 23:51
SpecFlow custom generator plugin
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Linq;
using BoDi;
using TechTalk.SpecFlow.Generator;
using TechTalk.SpecFlow.Generator.Configuration;
using TechTalk.SpecFlow.Generator.Plugins;
using TechTalk.SpecFlow.Generator.UnitTestConverter;
using TechTalk.SpecFlow.Generator.UnitTestProvider;
@ngbrown
ngbrown / WhenGivenAttribute.cs
Created November 9, 2012 19:52
It would be nice if SpecFlow accepted custom attributes based off of StepDefinitionBaseAttribute
namespace StepDefinitions
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using TechTalk.SpecFlow;
using TechTalk.SpecFlow.Assist;
@rtrcolin
rtrcolin / jiraRefreshTickets.js
Last active January 8, 2024 13:59
Super simple Google Docs integration with Jira Issues/Tickets
// URL for Jira's REST API for issues
var getIssueURL = "https://[Your Jira host]/rest/api/2/issue/";
// Personally I prefer the script to handle request failures, hence muteHTTPExceptions = true
var fetchArgs = {
contentType: "application/json",
headers: {"Authorization":"Basic [Your BASE64 Encoded user:pass]"},
muteHttpExceptions : true
};
using System.Configuration;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
using FluentNHibernate.Cfg;
using FluentNHibernate.Cfg.Db;
@derjabkin
derjabkin / gist:6549465
Created September 13, 2013 11:24
XAF ASP.NET Shortcut for an action
public class ActionContainerHolderEx : ActionContainerHolder
{
protected override DevExpress.ExpressApp.Web.Templates.ActionContainers.Menu.MenuActionItemBase CreateSimpleActionItem(DevExpress.ExpressApp.Actions.SimpleAction simpleAction)
{
SimpleActionMenuActionItem item = base.CreateSimpleActionItem(simpleAction) as SimpleActionMenuActionItem;
if (item != null)
{
ModificationsController controller = item.Action.Controller as ModificationsController;
@quexy
quexy / SpecFlow.CollectionVerifier.cs
Last active August 29, 2015 14:01
Collection verifier for SpecFlow
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
namespace TechTalk.SpecFlow.ObjectVerification
{
public static class CollectionVerifierExtensions
{
/// <summary>
@krunalm
krunalm / appveyor deplyment name with version
Created June 5, 2014 10:12
appveyor deplyment name with version
function ZipFiles($zipfilename, $sourcedir)
{
[Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem")
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
[System.IO.Compression.ZipFile]::CreateFromDirectory($sourcedir, $zipfilename, $compressionLevel, $false)
}
# Step 1 - Sign all output assemblies
# TODO
@bsommardahl
bsommardahl / AppVeyorArtifact
Last active August 29, 2015 14:04
AppVeyor Build Report Structure
public class AppVeyorArtifact
{
public string FileName { get; set; }
public string Name { get; set; }
public string Type { get; set; }
public int Size { get; set; }
public string Url { get; set; }
}