Skip to content

Instantly share code, notes, and snippets.

View tygerbytes's full-sized avatar

Ty Walls tygerbytes

View GitHub Profile
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')

Keybase proof

I hereby claim:

  • I am tygerbytes on github.
  • I am tygerbytes ( on keybase.
  • I have a public key ASBMK0ZxOPepnDwLoC7bTnbFSneqiJUANBuNo3nK79nK7wo

To claim this, I am signing this object:

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 (
# Example:
# Process-LotsOfWork | Out-Email -To, -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):
<div class="text-muted"><%= run_type.description %></div>
<div class="text-muted">{{ this.runType.description }}</div>
<div class="form-group">
<%= label_tag(:run_type, 'Today, I plan on running:') %>
<div class="input-group">
<%= select_tag(
options_for_select(TargetPaceHelper::all_run_types, :DistanceRun),
{:class => 'form-control'})
<div class="text-muted" id="run_type_explanation">
<div class="form-group">
<label for="run_type">Today, I plan on running:</label>
<div class="input-group">
<select name="run_type"
<option v-for="run in lib.runTypes"
<nav class="navbar navbar-default navbar-fixed-bottom">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<b-navbar fixed="bottom" toggleable="md" type="light" variant="light">
<b-navbar-toggle target="nav_collapse"></b-navbar-toggle>
<b-navbar-brand to="/">&#x1F3C3; Runby Pace</b-navbar-brand>
<b-collapse is-nav id="nav_collapse">
<b-nav-item to="/">Home</b-nav-item>
<b-nav-item to="/about">About</b-nav-item>
<input type="text"
'form-control': true,
'is-invalid': this.invalidRaceTime }"
placeholder="A recent 5K race time, like 21:30" />
<div class="invalid-feedback">{{ this.raceTimeValidationMessage }}</div>