Skip to content

Instantly share code, notes, and snippets.

Chris Hunt cdhunt

Block or report user

Report or block cdhunt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
potatoqualitee / mentalhealth.txt
Last active Jan 12, 2020
⛔ Twitter mental health mute list
View mentalhealth.txt
# mute here:
ku klux klan
View PSAutoMute.ps1
#Adding definitions for accessing the Audio API
Add-Type -TypeDefinition @'
using System.Runtime.InteropServices;
[Guid("5CDF2C82-841E-4546-9722-0CF74078229A"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
interface IAudioEndpointVolume {
// f(), g(), ... are unused COM method slots. Define these if you care
int f(); int g(); int h(); int i();
mattifestation / Example_WMI_Detection_EventLogAlert.ps1
Created Jan 14, 2016
An example of how to use permanent WMI event subscriptions to log a malicious action to the event log
View Example_WMI_Detection_EventLogAlert.ps1
# Define the signature - i.e. __EventFilter
$EventFilterArgs = @{
EventNamespace = 'root/cimv2'
Name = 'LateralMovementEvent'
Query = 'SELECT * FROM MSFT_WmiProvider_ExecMethodAsyncEvent_Pre WHERE ObjectPath="Win32_Process" AND MethodName="Create"'
QueryLanguage = 'WQL'
$InstanceArgs = @{
Namespace = 'root/subscription'
mgreenegit / WSManTrust.psm1
Last active Aug 29, 2015
Simple set of commands to maintain the WSMan trusted hosts list
View WSManTrust.psm1
function Get-WSManTrust {
(Get-Item -Path WSMan:\localhost\Client\TrustedHosts | % Value).split(',')
function New-WSManTrust {
Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value $hostname -Concatenate -Force
ohanhi /
Last active Mar 10, 2020
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

altrive / PowerShellv5_UsingNamespace.ps1
Last active Nov 12, 2019
PowerShell v5 'using namespace' syntax test
View PowerShellv5_UsingNamespace.ps1
#Require -Version 5.0
# using statement must appear before any other statements in a script.
# other using types(Assembly/Command/Module/Type) is not supported yet?
# [Enum]::GetNames('System.Management.Automation.Language.UsingStatementKind')
using namespace System.Diagnostics
using namespace System.Linq
function Main
View Assert-Authentication.ps1
function Assert-Authentication {
if(!$script:AuthSession -Or $Force) {
$creds = Get-CLCAPICredentials -ActiveCredential
robinsmidsrod / logstash.conf
Created Dec 5, 2012
Logging Windows event log information to Logstash using nxlog and JSON transport
View logstash.conf
input {
tcp {
type => "syslog"
host => ""
port => 3514
tcp {
type => "eventlog"
host => ""
port => 3515
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
You can’t perform that action at this time.