Skip to content

Instantly share code, notes, and snippets.

### 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:
@pezhore
pezhore / dhtsend.sh
Last active July 27, 2016 15:24
Simple bash script that will poll for data on a DHT22 sensor and push to a Domoticz system
#!/bin/bash
# Domoticz server
SERVER="localhost:8080"
# IDX DHT
# The number of the IDX in the list of peripherals
DHTIDX="4"
#DHTPIN
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 = @()
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 = @()
# 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
function Get-Benchmark {
[CmdletBinding()]
param(
$ScriptBlock,
[Int32] $Iterations
)
begin {}
process {
$AllTimespans = [System.Collections.ArrayList]@()
function Get-OlkbOrder {
<#
.SYNOPSIS
Checks for a given order on https://olkb.com/ to determine the current place in line for shipping. Optionally stores the
place in line in a file on disk.
.DESCRIPTION
Parses the current orders markdown file on github for https://olkb.com orders, searching for a given order number. When
found, the order number and place in line is output. If the option for tracking is provided, the current place in line
is compared to the previously stored place in line and the difference is displayed.
.EXAMPLE
@pezhore
pezhore / source.csv
Last active November 20, 2019 10:39
Kaomoji source
HumanReadable Kaomoji KaomojiEscaped
Shruggie ¯\_(ツ)_/¯ ¯\\\_(ツ)_/¯
TableFlip (╯°□°)╯︵ ┻━┻ (╯°□°)╯︵ ┻━┻
TableDown ┬─┬ノ( º _ ºノ) ┬─┬ノ( º _ ºノ)
Angry (/゚Д゚)/ (/゚Д゚)/
Disappointed ಠ_ಠ ಠ_ಠ
Strut ᕕ( ᐛ )ᕗ ᕕ( ᐛ )ᕗ
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

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.