Skip to content

Instantly share code, notes, and snippets.

@infosec-intern
infosec-intern / Makefile
Created August 22, 2016 23:30
New exercise and skeleton Makefile scripts - makes creating new exercises easier for LearnCTheHardWay
CFLAGS=-Wall -g
EX=
all:
make ${EX}
ec:
gcc ${CFLAGS} -o ec extracredit.c
broken:
@infosec-intern
infosec-intern / touch-alias.ps1
Created June 4, 2016 14:21
Adds a Unix-like "touch" command to PowerShell. Add to your profile to get this on PowerShell startup
New-Alias -Name "touch" -Value "New-Item" -Force
@infosec-intern
infosec-intern / example-profile.ps1
Created June 4, 2016 13:56
Example script to load user-specific modules into your PowerShell profile. Tested in PowerShell v5
$RootDir = 'C:\Users\user\Documents\WindowsPowerShell'
$Counter=0
ForEach ($Module in $(Get-ChildItem "$RootDir\Modules")) {
try {
Import-Module $Module\*.psd1
}
catch {
Import-Module $Module\*.psm1
}
$Counter++