Skip to content

Instantly share code, notes, and snippets.

View Jil's full-sized avatar

Jil Larner Jil

  • Mont Blanc, France
View GitHub Profile
@Jil
Jil / fix.ps1
Created April 13, 2020 13:10
sort-folder-unique-content
# Folder to crawl
$srcFolder = "C:\Users\xxx\Documents\test"
# Folder to regroup identical file names which have different versions
$sortedFolder = "C:\Users\xxx\Documents\sorted"
# If the folder doesn't exist, create it
if(!(Test-Path $sortedFolder)) {
New-Item -ItemType Directory -Path $sortedFolder -ErrorAction Stop
} else {
"Sorted folder already exists, please delete it first"
@Jil
Jil / fix-fw.ps1
Created July 22, 2019 19:28
Powershell disable native rdp/wmi rules
# Disable built-in rules which conflict with GPO rules filtering on IP origin
$rules = Get-NetFirewallRule -Direction Inbound -Enabled True |?{$_.Name -like "RemoteDesktop*"}
foreach ($r in $rules) {
"Disabling: " + $r.Name
$r | Disable-NetFirewallRule
}
<#
Disabling: RemoteDesktop-UserMode-In-TCP
Disabling: RemoteDesktop-UserMode-In-UDP
@Jil
Jil / gist:79f44120a56b661a95779ff3bbce0fde
Last active August 26, 2017 16:10
Les fondations du comptoir
brew install node
brew install npm
brew install git
sudo npm install gulp yarn -g
brew install hugo
mkdir ComptoirSecu
cd ComptoirSecu/
git clone https://github.com/comptoirsecu/csec-hugo
|| sous gentoo: