This is the quickest way I've found to kill all tmux sessions
# detach from each session
<prefix>d
# kill tmux and all sessions
tmux kill-server
require 'pry' | |
class SearchLoopingTwo | |
def self.chop(query, col) | |
left = 0 | |
right = col.count - 1 | |
middle = col.count / 2 | |
#binding.pry if query == 5 | |
while right >= left do |
barrette batterer | |
barye beray yerba | |
basally salably | |
basaltic cabalist | |
base besa sabe | |
basion bonsai sabino | |
basketwork workbasket | |
bastille listable | |
bat tab | |
batcher brachet |
This is the quickest way I've found to kill all tmux sessions
# detach from each session
<prefix>d
# kill tmux and all sessions
tmux kill-server
$('#myModal').reveal({ | |
animation: 'fadeAndPop', // Possible options: fade, fadeAndPop, none | |
animationSpeed: 300, //Speed at which the reveal should show. How fast animtions are | |
closeOnBackgroundClick: true, //Should the modal close when the background is clicked? | |
dismissModalClass: 'close-reveal-modal', //Specify a class name for the 'close modal' element. | |
open: function(){}, //callback function that triggers 'before' the modal opens. | |
opened: function(){}, //callback function that triggers 'after' the modal is opened. | |
close: function(){}, //callback function that triggers 'before' the modal prepares to close. | |
closed: function(){} //callback function that triggers 'after' the modal is closed. | |
}); |
zeus init # => creates custom_plan.rb and zeus.json |
require 'simplecov' | |
SimpleCov.configure do | |
SimpleCov.refuse_coverage_drop | |
add_filter "/spec/" | |
add_filter "scraper.rb" # don't care that this is spaghetti code | |
add_filter "error_messages_helper.rb" | |
add_filter "/config/" | |
add_filter "controller" | |
SimpleCov.minimum_coverage 93 | |
end |
require 'active_support/core_ext' | |
def dates_with_no_changes(employment_dates) | |
dates = [] | |
employment_dates.each do |date| | |
dates << date[:start_at].to_date | |
if date[:end_at].nil? | |
dates << Date.current.next_year | |
else | |
dates << date[:end_at].to_date |
def validate_messages(message) | |
message.split(' ').each do |msg| | |
if valid? msg | |
puts msg + " VALID" | |
else | |
puts msg + " INVALID" | |
end | |
end | |
end |
class Dependencies | |
def initialize | |
@dependencies = Hash.new {|h,k| h[k] = []} | |
end | |
def add_direct item, new_dependencies | |
@dependencies[item] += new_dependencies | |
end | |
def dependencies_for item |
defmodule Search do | |
def chop(_val, []), do: -1 | |
def chop(val, [head|tail]) when tail == [] do | |
if val == head, do: 0, else: -1 | |
end | |
def chop(val, list) do | |
chop(val, 0, length(list) - 1, list) | |
end |