Skip to content

Instantly share code, notes, and snippets.

@JonathonReinhart
JonathonReinhart / sample_output
Created July 29, 2016 15:12
Show Ethernet drivers on Linux
$ ~/what_eth_drivers.sh
eth0 [52:54:00:aa:bb:cc]: virtio_net (up)
eth1 [52:54:00:dd:ee:ff]: virtio_net (up)
eth2 [52:54:00:99:88:77]: virtio_net (up)
lo [00:00:00:00:00:00]: (unknown)
@gregjhogan
gregjhogan / random-string-generator.ps1
Last active February 5, 2025 17:14
Generate random string in powershell
#lowercase letters/numbers only
-join ((48..57) + (97..122) | Get-Random -Count 32 | % {[char]$_})
# all characters
-join ((33..126) | Get-Random -Count 32 | % {[char]$_})
-- List enabled server specifications
SELECT audit_id,
a.name as audit_name,
s.name as server_specification_name,
d.audit_action_name,
s.is_state_enabled,
d.is_group,
d.audit_action_id,
s.create_date,
s.modify_date
@edyoung
edyoung / qot.ps1
Last active February 14, 2023 14:01
A powershell script ('query over time') to repeat a query against Visual Studio Online as it would have appeared on multiple days
#
# QoT = Query Over Time. Take a JSON query for VSO and rerun it with several different AsOf dates, and dump the output to the pipeline
# Normal usage would be qot.ps1 -user edyoung -accessToken secrettoken -project SBS -team skype -startdate "8/1/2015" -enddate "9/1/2015" | ConvertTo-Csv -NoTypeInformation > bugdata.csv
param(
$user,
$accessToken,
$project,
$team,
@jwebcat
jwebcat / gist:5122366
Last active January 23, 2025 05:43 — forked from lemenkov/gist:1674929
Properly download from github using wget and curl
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1
# --no-check-cerftificate was necessary for me to have wget not puke about https
curl -LJO https://github.com/joyent/node/tarball/v0.7.1
@xcud
xcud / Get-Assemblies.ps1
Last active January 15, 2025 20:20
Gets a list of the assemblies loaded into memory in the current AppDomain.
<#
.Synopsis
Gets a list of the assemblies loaded into memory in the current AppDomain.
.Example
PS> Get-Assemblies power -NameOnly
Name
----
Microsoft.PowerShell.ConsoleHost.dll
Microsoft.PowerShell.Security.dll