Skip to content

Instantly share code, notes, and snippets.

View tygerbytes's full-sized avatar
🦖

Ty Walls tygerbytes

🦖
View GitHub Profile
<div class="text-muted">{{ this.runType.description }}</div>
<div class="text-muted"><%= run_type.description %></div>
@tygerbytes
tygerbytes / Out-Email.ps1
Last active September 13, 2018 20:54
Out-Email: PowerShell function/cmdlet that tees output stream to an email
# Out-Email (github.com/tygerbytes)
#
# Example:
# Process-LotsOfWork | Out-Email -To bob@example.com, tina@example.com -Subject "Lots of work"
# Sends an email to Bob and Tina with the output of the function, Process-LotsOfWork.
#
# Example (Redirect all streams to standard output so that errors will appear in email):
# Process-LotsOfWork *>&1 | Out-Email [...]
#
# Example (Continue processing output after piping to Out-Email):

Keybase proof

I hereby claim:

  • I am tygerbytes on github.
  • I am tygerbytes (https://keybase.io/tygerbytes) on keybase.
  • I have a public key ASBMK0ZxOPepnDwLoC7bTnbFSneqiJUANBuNo3nK79nK7wo

To claim this, I am signing this object:

@tygerbytes
tygerbytes / resolv.rb.diff
Last active December 29, 2016 02:20
Ruby 2.3 on Windows: Fix "incompatible character encoding: UTF-8 and ASCII-8BIT" error
diff --git a/lib/ruby/2.3.0/resolv.rb b/lib/ruby/2.3.0/resolv.rb
index 9a981b9..c519e0e 100644
--- a/lib/ruby/2.3.0/resolv.rb
+++ b/lib/ruby/2.3.0/resolv.rb
@@ -773,7 +773,7 @@ class Resolv
service = [host, port]
id = DNS.allocate_request_id(host, port)
request = msg.encode
- request[0,2] = [id].pack('n')
+ request[0,2] = [id].pack('U')