Skip to content

Instantly share code, notes, and snippets.

@cubanx
cubanx / 2011-10-28.vssettings
Created October 28, 2011 12:41
Visual Studio Settings Red Team
<UserSettings>
<ApplicationIdentity version="10.0"/>
<ToolsOptions>
<ToolsOptionsCategory name="Environment" RegisteredName="Environment">
<ToolsOptionsSubCategory name="Documents" RegisteredName="Documents" PackageName="Visual Studio Environment Package">
<PropertyValue name="ShowMiscFilesProject">false</PropertyValue>
<PropertyValue name="AutoloadExternalChanges">true</PropertyValue>
<PropertyValue name="CheckForConsistentLineEndings">true</PropertyValue>
<PropertyValue name="SaveDocsAsUnicodeWhenDataLoss">false</PropertyValue>
<PropertyValue name="InitializeOpenFileFromCurrentDocument">true</PropertyValue>
@cubanx
cubanx / gist:1682973
Created January 26, 2012 14:19
Tracking alias
tracking = for-each-ref --format='%(refname:short) <- %(upstream:short)' refs/heads
@cubanx
cubanx / git-aliases.sh
Created February 7, 2012 20:03
My git.config global aliases
git config --global alias.slog "log -n 10 --format=format:'%Creset%an %Cgreen%ar:%Creset%s %Cred%h'"
git config --global alias.ci "!git add -A && git commit"
git config --global alias.tracking "for-each-ref --format='%(refname:short) <- %(upstream:short)' refs/heads"
git config --global alias.s "status --short"
using System.Web.Mvc;
using Moq;
using NUnit.Framework;
using Specs.Core;
using Specs.Reporting.Mixins;
using TNW.Common.nHibernate;
using TNW.Reporting.Web.Controllers;
namespace Specs.Reporting.Web.Controllers
{
using System;
using System.Web;
using System.Web.Mvc;
using Moq;
using NUnit.Framework;
using TNW.Reporting.Domain.Common;
using TNW.Reporting.Domain.Entities.User;
using TNW.Reporting.Domain.Managers;
using TNW.Reporting.Test.Common;
using TNW.Reporting.Web.Controllers;
@cubanx
cubanx / AutoHotkey.ahk
Created March 29, 2012 12:34
File for quake like console with AutoHotkey
;Hide the script's tray icon
#NoTrayIcon
;Use the same icon of console.exe for the script's tray icon (note that "#NoTrayIcon" hide the default one and any other icon, you must delete or coment "#NoTrayIcon" in order to show this icon in taskbar)
:Menu, Tray, Icon, console.exe, 1
; Launch console if necessary; hide/show on Win+`
;You can coustomise this by yourself #=Win, !=Alt, ^=Ctrl, +=Shift, see (http://www.autohotkey.com/docs/Hotkey.htm - http://www.autohotkey.com/docs/KeyList.htm )
#`::
DetectHiddenWindows, on
@cubanx
cubanx / WhenAPublicationIsFound.cs
Created September 14, 2012 15:11
YUNO Maths good?
[Test]
public void It_should_play() {
int completeAttestations = 38;
int totalAttestations = 84;
Expect(Math.Round((double)((completeAttestations * 100) / totalAttestations)), EqualTo(Math.Round(completeAttestations * 100d / totalAttestations)));
var actualUnrounded = (double)((completeAttestations * 100) / totalAttestations);
var expectedUnrounded = completeAttestations * 100d / totalAttestations;
Expect(actualUnrounded, EqualTo(expectedUnrounded), "Actual: <{0}>, Expected: <{1}>".FormatWith(actualUnrounded, expectedUnrounded));
// ==UserScript==
// @name Pivotal Biggify
// @description Makes Pivotal usable on a big board
// @include https://*.pivotaltracker.com/*
// ==/UserScript==
if (location.hostname == 'www.pivotaltracker.com') {
setInterval(function() {
document.getElementById('header').style.display = 'none';
document.getElementById('controlPanel').style.display = 'none';
@cubanx
cubanx / releaseplan
Last active August 29, 2015 14:17
Prod deployment workflow
#When something goes wrong...
###Deploy `master` to UK, find a bug at some point during the week.
This scenario is the one we're hoping will happen the most of the least likely scenarios :) (Yeah, kinda confusing sentence, but read it again)
* `DARLENE` is deployed to UK on Friday and it's master as of midnight Thursday.
* `CHARLIE` is the lagged release deployed to US on the same Friday.
* `EDNA` is the release that started the moment the first commit went in after midnight on Thursday on master
@cubanx
cubanx / Powershell Class Outline
Created September 26, 2016 16:50 — forked from rgborck/Powershell Class Outline
This is an outline of a PowerShell class I taught to my coworkers in the fall of 2015
Powershell - Lesson 1
Configuration:
Powershell profile
Import-Module Grc
(Test it w/ `Get-GrcTenants`)
Syntax:
Variable declaration $
Powershell variables ( $true, $null, $false, etc )
Control Structures
Conditionals (-eq, -ne, -contains, etc)