Skip to content

Instantly share code, notes, and snippets.

Avatar

Ian Battersby ianbattersby

View GitHub Profile
@ianbattersby
ianbattersby / OrmLiteVistaDbCommand.cs
Created Feb 19, 2014
Current VistaDB.5 OrmLite v4 dialect
View OrmLiteVistaDbCommand.cs
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using VistaDB.Provider;
namespace ServiceStack.OrmLite.VistaDB
{
public class OrmLiteVistaDbCommand : IDbCommand
@ianbattersby
ianbattersby / LockMachine.scpt
Created May 17, 2014
Alfred workflow examples
View LockMachine.scpt
on alfred_script(q)
do shell script "open /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app"
end alfred_script
View gist:05a64efc693fffd55d0d
function generateUUID(){
var d = new Date().getTime();
var uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
var r = (d + Math.random()*16)%16 | 0;
d = Math.floor(d/16);
return (c === "x" ? r : (r&0x7|0x8)).toString(16); });
return uuid;
}
View gist:d6f2813bc0a30f6e0307
Aldgate: @AssociationEC3^+ and @Dose_E1*%
Camden Town: Lola's*%
Farringdon: Prufrock+^% and Dept Coffee & Resp^%
Holborn: Workshop^
Islington: @SaintEspresso+*%
Kings Cross: CaravanX^+@
OldSt/Barbican: TimberYard* and Look Ma No Hands*
OldSt/Hoxton: MacIntyres R.I.P. and Embassy East
Marble Arch: Borough Barista*
TCourtRd: T.A.P. Coffee
@ianbattersby
ianbattersby / alsa.conf
Last active Aug 29, 2015
ThinkPad t440 /etc/modprobe.d/alsa.conf for audio
View alsa.conf
options snd_hda_intel enable=0,1
options snd slots=snd_hda_intel,thinkpad_acpi
options snd_hda_intel index=0
options thinkpad_acpi index=1
@ianbattersby
ianbattersby / archandwin8.md
Last active Aug 29, 2015
Some notes for Mark from installing Arch side-by-side with existing Windows 8.1 installation
View archandwin8.md

NOTE! If you have a BitLockered Windows partition and TPM this may fail in ways I don't want to comprehend. Un-bitlock first if I were you should that be the case.

NOTE! I wrote most of this from memory, one I regularly volunteer is shocking ;)

Backup shit

  • Boot into Windows and backup your current UEFI partition using BCDEDIT /export
  • Backup Windows if you really give a shit

Before you do anything else

  • Turn off SECURE BOOT in the BIOS and make sure it still boots up into Windows
View gist:6e9d20802ec59dacfebe
[15200,07,15:26:50.939] Read Request Body Failed.
Value cannot be null.
Parameter name: token
View keybase.md

Keybase proof

I hereby claim:

  • I am ianbattersby on github.
  • I am ianbattersby (https://keybase.io/ianbattersby) on keybase.
  • I have a public key whose fingerprint is E33D 9F6B 8CAF FB9B 419E 7586 EE2D 6FBB 294F 3BE7

To claim this, I am signing this object:

@ianbattersby
ianbattersby / gist:980950
Created May 19, 2011
TFS Subscriber example, need to access WorkItemStore
View gist:980950
public EventNotificationStatus ProcessEvent(
TeamFoundationRequestContext requestContext,
NotificationType notificationType,
object notificationEventArgs,
out int statusCode,
out string statusMessage,
out ExceptionPropertyCollection properties
)
{
statusCode = 0;
@ianbattersby
ianbattersby / NUnitAndPublishTemplate.xaml
Created Jan 4, 2012
TFS 2010 Build workflow incorporating NUnit runner and publishing back into TFS via NUnitTfs
View NUnitAndPublishTemplate.xaml
<Activity mc:Ignorable="sap" x:Class="TfsBuild.Process" this:Process.BuildSettings="[New Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings()]" this:Process.TestSpecs="[New Microsoft.TeamFoundation.Build.Workflow.Activities.TestSpecList(New Microsoft.TeamFoundation.Build.Workflow.Activities.TestAssemblySpec(&quot;**\*test*.dll&quot;))]" this:Process.BuildNumberFormat="[&quot;$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)&quot;]" this:Process.CleanWorkspace="[Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.All]" this:Process.RunCodeAnalysis="[Microsoft.TeamFoundation.Build.Workflow.Activities.CodeAnalysisOption.AsConfigured]" this:Process.SourceAndSymbolServerSettings="[New Microsoft.TeamFoundation.Build.Workflow.Activities.SourceAndSymbolServerSettings(True, Nothing)]" this:Process.AgentSettings="[New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentSettings() With {.MaxWaitTime = New System.TimeSpan(4, 0, 0), .MaxExecutionTime = New System.TimeSpan(0, 0, 0), .Ta