This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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| |
OlderNewer