Skip to content

Instantly share code, notes, and snippets.

View programcsharp's full-sized avatar

Chris Hynes programcsharp

View GitHub Profile
@programcsharp
programcsharp / set-win-resize-border-100.ps1
Created October 28, 2023 14:44 — forked from yzorg/set-win-resize-border-100.ps1
Make Win10/Win11 window borders a bit easier to resize. Key is from https://superuser.com/a/1767917/31557
# reg key is from https://superuser.com/a/1767917/31557
$BorderWidthValue = -120
#$BorderWidthValue = -200 # uncomment this to make them really wide, @yzorg likes -100 so kept that default
# make a backup of current value
pushd ~\Documents
reg export 'HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics' .\registry-WindowMetrics-old.reg
pushd ('HKEY_CURRENT_USER\Control Panel\Desktop' -replace 'HKEY_CURRENT_USER','HKCU:')
@programcsharp
programcsharp / gist:71fadf02645f23f5d6d0
Created May 7, 2015 17:52
CommaSeparatedModelBinder array fix
private object BindCsv(Type type, string name, ModelBindingContext bindingContext)
{
if (type.GetInterface(typeof(IEnumerable).Name) != null)
{
var actualValue = bindingContext.ValueProvider.GetValue(name);
if (actualValue != null)
{
var valueType = type.GetElementType() ?? type.GetGenericArguments().FirstOrDefault();

Keybase proof

I hereby claim:

  • I am programcsharp on github.
  • I am programcsharp (https://keybase.io/programcsharp) on keybase.
  • I have a public key whose fingerprint is 6308 C831 30E6 05B1 57E1 9BAF D8E2 D2A4 31AA CA5C

To claim this, I am signing this object: