This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
============================================================================ | |
Name : hello_world.c | |
Author : Gordon Young | |
Version : | |
Copyright : Your copyright notice | |
Description : Hello World in C, Ansi-style | |
============================================================================ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
============================================================================ | |
Name : hello_world.c | |
Author : Gordon Young | |
Version : | |
Copyright : Your copyright notice | |
Description : Hello World in C, Ansi-style | |
============================================================================ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
============================================================================ | |
Name : hello_world.c | |
Author : Gordon Young | |
Version : | |
Copyright : Your copyright notice | |
Description : Hello World in C, Ansi-style | |
============================================================================ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
============================================================================ | |
Name : hello_world.c | |
Author : Gordon Young | |
Version : | |
Copyright : Your copyright notice | |
Description : Hello World in C, Ansi-style | |
============================================================================ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm"> | |
<name>macOS-Simple-KVM</name> | |
<uuid>d06d502a-904a-4b34-847d-debf1a3d76c7</uuid> | |
<metadata> | |
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> | |
<libosinfo:os id="http://freebsd.org/freebsd/12.0"/> | |
</libosinfo:libosinfo> | |
</metadata> | |
<memory unit="KiB">2097152</memory> | |
<currentMemory unit="KiB">2097152</currentMemory> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get enabled members of a given AD group | |
get-adgroupmember "some-group" | | |
where {$_.objectclass -eq 'user'} | | |
Get-ADUSer -properties Name,Mail | | |
Select Name,Mail, Enabled | Where-Object {$_.Enabled -like “True”} | export-csv -path "C:\users\gordon.young\Desktop\some-group-05122020.csv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Gets users in a GSuite directory and add to a Gsheet | |
*/ | |
//Expose this as a Webhook ? | |
//function doGet(e) { | |
// GetGsuiteUsers(); | |
// return HtmlService.createHtmlOutput("GET request received"); | |
//} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get our pod names | |
FALCO_EXPORTER_POD=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=falco-exporter,app.kubernetes.io/instance=falco-exporter" -o jsonpath="{.items[0].metadata.name}") | |
GRAFANA_POD=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=grafana" -o jsonpath="{.items[0].metadata.name}") | |
PROMETHEUS_POD=$(kubectl get pods --namespace default -l "app=prometheus" -o jsonpath="{.items[0].metadata.name}") | |
ALERT_MANAGER_POD=$(kubectl get pods --namespace default -l "app=alertmanager" -o jsonpath="{.items[0].metadata.name}") | |
function falco { | |
# forward UI ports |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Gets users in a GSuite directory and add to a Gsheet | |
*/ | |
function GetAllDirectoryUsers() { | |
// Create a new sheet - TODO append a running sheet | |
var sheet = SpreadsheetApp.create('Gordon_Sheet').getActiveSheet(); | |
var sheet = sheet; | |
var sheetrange = sheet.getRange("A:F") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
export PATH=$HOME/.cargo/bin:$HOME/bin:/usr/local/bin | |
source $HOME/.cargo/env | |
export GOPATH=$HOME/go | |
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
ZSH_THEME="robbyrussell" | |
plugins=(git) |