Skip to content

Instantly share code, notes, and snippets.

View ianbattersby's full-sized avatar
🐘
@ianbattersby@hachyderm.io

Ian Battersby ianbattersby

🐘
@ianbattersby@hachyderm.io
View GitHub Profile
@ianbattersby
ianbattersby / OrmLiteVistaDbCommand.cs
Created February 19, 2014 13:22
Current VistaDB.5 OrmLite v4 dialect
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 19:27
Alfred workflow examples
on alfred_script(q)
do shell script "open /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app"
end alfred_script
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;
}
@ianbattersby
ianbattersby / gist:d6f2813bc0a30f6e0307
Last active August 29, 2015 14:19
Ian's Coffee List
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 August 29, 2015 14:19
ThinkPad t440 /etc/modprobe.d/alsa.conf for audio
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 August 29, 2015 14:20
Some notes for Mark from installing Arch side-by-side with existing Windows 8.1 installation

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
[15200,07,15:26:50.939] Read Request Body Failed.
Value cannot be null.
Parameter name: token

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 14:59
TFS Subscriber example, need to access WorkItemStore
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 January 4, 2012 11:19
TFS 2010 Build workflow incorporating NUnit runner and publishing back into TFS via NUnitTfs
<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