Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Marsh pezhore

View GitHub Profile
View gist:9152a463d37038de0c64
### Keybase proof
I hereby claim:
* I am pezhore on github.
* I am pezhore (https://keybase.io/pezhore) on keybase.
* I have a public key whose fingerprint is 2FF3 6582 9C22 8182 C352 C5E6 9385 92BE 8CA2 02E8
To claim this, I am signing this object:
View benchmark-command
function Benchmark-Command ([ScriptBlock]$Expression, [int]$Samples = 1, [Switch]$Silent, [Switch]$Long) {
<#
.SYNOPSIS
Runs the given script block and returns the execution duration.
Hat tip to StackOverflow. http://stackoverflow.com/questions/3513650/timing-a-commands-execution-in-powershell
.EXAMPLE
Benchmark-Command { ping -n 1 google.com }
#>
$timings = @()
@pezhore
pezhore / dhtsend.sh
Last active Jul 27, 2016
Simple bash script that will poll for data on a DHT22 sensor and push to a Domoticz system
View dhtsend.sh
#!/bin/bash
# Domoticz server
SERVER="localhost:8080"
# IDX DHT
# The number of the IDX in the list of peripherals
DHTIDX="4"
#DHTPIN
View benchmark-command.ps1
function Benchmark-Command ([ScriptBlock]$Expression, [int]$Samples = 1, [Switch]$Silent, [Switch]$Long) {
<#
.SYNOPSIS
Runs the given script block and returns the execution duration.
Hat tip to StackOverflow. http://stackoverflow.com/questions/3513650/timing-a-commands-execution-in-powershell
.EXAMPLE
Benchmark-Command { ping -n 1 google.com }
#>
$timings = @()
View sample.ps1
# Import CSVs
$csv1 = Import-CSV -Path c:\temp\csv1.csv
$csv2 = Import-CSV -Path c:\temp\csv2.csv
# Loop through each item in csv1
foreach ($item in $csv1) {
$thisDataType = $item.DataType
# find the entry in csv2 where csv2's column name matches this column name
View Get-Benchmark.ps1
function Get-Benchmark {
[CmdletBinding()]
param(
$ScriptBlock,
[Int32] $Iterations
)
begin {}
process {
$AllTimespans = [System.Collections.ArrayList]@()
View base16-pezhore.minttyrc
ForegroundColour=184,187,194
BackgroundColour=0,0,0
CursorColour=184,187,194
Black=6,18,41
BoldBlack=113,120,133
Red=208,115,70
BoldRed=240,160,0
Green=169,208,130
BoldGreen=63,78,107
Yellow=251,212,97
View Movie List.md

THE LIST

"Bad" or GREAT Movies

Watched & Recommended

  • Fast and Furious Franchise (except for Hobbs and Shaw): So rediculous. Give them a car and they'll do the impossible
  • AD BC: 70s Music about the biblical story of the Natvity - if it was set in '72.
  • Airborne: Not Airbud.
  • The Apple: Disco music is the devil.
@pezhore
pezhore / source.csv
Last active Nov 20, 2019
Kaomoji source
View source.csv
HumanReadable Kaomoji KaomojiEscaped
Shruggie ¯\_(ツ)_/¯ ¯\\\_(ツ)_/¯
TableFlip (╯°□°)╯︵ ┻━┻ (╯°□°)╯︵ ┻━┻
TableDown ┬─┬ノ( º _ ºノ) ┬─┬ノ( º _ ºノ)
Angry (/゚Д゚)/ (/゚Д゚)/
Disappointed ಠ_ಠ ಠ_ಠ
Strut ᕕ( ᐛ )ᕗ ᕕ( ᐛ )ᕗ
View bumpme
Wed Apr 29 21:30:45 UTC 2020