Skip to content

Instantly share code, notes, and snippets.

View SeanSobey's full-sized avatar

Sean Sobey SeanSobey

  • SA HomeLoans
  • South Africa
View GitHub Profile
@SeanSobey
SeanSobey / .gitattributes
Last active November 4, 2022 08:57
Git to diff zip (or any compressed) files. See this (https://tante.cc/2010/06/23/managing-zip-based-file-formats-in-git/) article.
*.[7z,xz,bzip2,gzip,tar,zip,wim,ar,arj,cab,chm,cpio,cramfs,dmg,ext,fat,gpt,hfs,ihex,iso,lzh,lzma,mbr,.msi,nsis,ntfs,qcow2,rar,rpm,squashfs,udf,uefi,vdi,vhd,vmdk,wim,xar,z] diff=archive
@SeanSobey
SeanSobey / .gitconfig
Created November 6, 2017 07:43
Set VSCode as git mergetool.
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
@SeanSobey
SeanSobey / portainer.md
Last active April 7, 2024 18:46
Portainer Setup on Windows 10

Portainer on Windows 10

Here I have 2 methods for running portainer on windows, a quick, preferred method only requiring a fairly recent version of docker, or a more complicated method to try if that does not work.

Using host.docker.internal

This setup will let you run Portainer on windows by using the host.docker.internal endpoint (docker.for.win.localhost is depricated since docker version 3.2.1, but older versions may use this instead).

Please note:

@SeanSobey
SeanSobey / createSpyObjFactory.ts
Created September 15, 2017 06:44
Dynamic spy object factory for Jasmine.
export function createSpyObjFactory<T>(ctor: new (...args: Array<any>) => T, includeProto?: boolean, ...args: Array<string>): () => jasmine.SpyObj<T> {
return () => includeProto
? jasmine.createSpyObj<T>(ctor.name, Object.getOwnPropertyNames(ctor.prototype).concat(Object.getOwnPropertyNames(Object.getPrototypeOf(ctor).prototype)).concat(args))
: jasmine.createSpyObj<T>(ctor.name, Object.getOwnPropertyNames(ctor.prototype).concat(args));
}