Skip to content

Instantly share code, notes, and snippets.

View terraformcomplete.vim
" Originally from https://github.com/juliosueiras/vim-terraform-completion
" autoload/terraformcomplete.vim
"
" The MIT License (MIT)
"
" Copyright (c) 2017 Julio Tain Sueiras
"
" Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to deal
" in the Software without restriction, including without limitation the rights
@TechIsCool
TechIsCool / SortGroup.vim
Created Jul 26, 2019 — forked from PeterRincker/SortGroup.vim
Sort groups of lines in vim
View SortGroup.vim
" :[range]SortGroup[!] [n|f|o|b|x] /{pattern}/
" e.g. :SortGroup /^header/
" e.g. :SortGroup n /^header/
" See :h :sort for details
function! s:sort_by_header(bang, pat) range
let pat = a:pat
let opts = ""
if pat =~ '^\s*[nfxbo]\s'
let opts = matchstr(pat, '^\s*\zs[nfxbo]')
@TechIsCool
TechIsCool / WinRM-HTTPS.ps1
Created Nov 28, 2017
A simple Powershell WinRM-HTTPs setup
View WinRM-HTTPS.ps1
Write-Output "Disabling WinRM over HTTP..."
Disable-NetFirewallRule -Name "WINRM-HTTP-In-TCP"
Disable-NetFirewallRule -Name "WINRM-HTTP-In-TCP-PUBLIC"
Get-ChildItem WSMan:\Localhost\listener | Remove-Item -Recurse
Write-Output "Configuring WinRM for HTTPS..."
Set-Item -Path WSMan:\LocalHost\MaxTimeoutms -Value '1800000'
Set-Item -Path WSMan:\LocalHost\Shell\MaxMemoryPerShellMB -Value '1024'
Set-Item -Path WSMan:\LocalHost\Service\AllowUnencrypted -Value 'false'
Set-Item -Path WSMan:\LocalHost\Service\Auth\Basic -Value 'true'