Skip to content

Instantly share code, notes, and snippets.

View tcmacdonald's full-sized avatar
🪕

Taylor MacDonald tcmacdonald

🪕
  • Ample
  • Cincinnati, OH
View GitHub Profile
#!/bin/sh
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Manage unicorn server
# Description: Start, stop, restart unicorn server for a specific application.
### END INIT INFO
upstream app {
# Path to Unicorn SOCK file, as defined previously
server unix:/home/ubuntu/sites/something-com/shared/tmp/sockets/unicorn.sock fail_timeout=0;
}
server {
listen 80;
server_name something.com;
root /home/ubuntu/sites/something-com/current/public;
<!-- ID: 873 -->
<div class="container-fluid sticky-top">
<div class="row">
<a href="javascript:void(0)" class="btn btn-live-schedule-trigger hidden-xs" data-smooth-scroll-to="live-stream-schedule"
data-smooth-scroll-offset="92">
<span>See Schedule</span>
<svg class="icon icon-1" viewbox="0 0 256 256">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/svgs/icons.svg#chevron-down"></use>
</svg>
@tcmacdonald
tcmacdonald / question-marks.rb
Created November 9, 2018 20:36
Coding Challenge #2
def question_marks(str)
# Get any number + chars + number pattern...
regex = /(\d)[a-zA-Z\?]*(\d)/
# Iterate over each occurrence and return the MatchData object
matches = str.to_enum(:scan, regex).map { Regexp.last_match }
# Iterate over each match and return a boolean meeting the following conditions...
bools = matches.collect do |match|