-
Open a browser
# start an instance of firefox with selenium-webdriver driver = Selenium::WebDriver.for :firefox # :chrome -> chrome # :ie -> iexplore
- Go to a specified URL
from https://apidock.com/ruby/DateTime/strftime | |
Basic: | |
Date (Year, Month, Day): | |
%Y - Year with century (can be negative, 4 digits at least) | |
-0001, 0000, 1995, 2009, 14292, etc. | |
%C - year / 100 (round down. 20 in 2009) | |
%y - year % 100 (00..99) | |
%m - Month of the year, zero-padded (01..12) |
It was a dark and stormy night in the city, and detective Paul Stanley of the Kiss Detective Agency was on the case. He had been hired by a group of women who claimed to have had an unforgettable evening with the members of the famous rock band Kiss, only to wake up the next morning with no memory of what had happened. | |
Paul had heard rumors of the band's wild parties and was not surprised by the women's request. He knew that if anyone could help solve this mystery, it was him. | |
As he began his investigation, Paul learned that the women had met the band at a football game and had gone on to spend the evening drinking cognac and discussing literature and music at a nearby library. From there, the trail went cold. | |
Determined to uncover the truth, Paul decided to pay a visit to the library. As he arrived, he noticed a helicopter parked outside, its rotors still spinning. Without a moment's hesitation, he climbed aboard and took off into the night sky. | |
As he flew over the city, Paul scanned the streets below fo |
(setq byte-compile-warnings '(cl-functions)) | |
(setq package-user-dir "/usr/local/share/emacs/site-lisp/elpa") | |
(display-time-mode 1) | |
(require 'rust-mode) | |
(modify-syntax-entry ?_ "-") | |
(modify-syntax-entry ?a "w" text-mode-syntax-table) | |
(let ((default-directory "/usr/local/share/emacs/site-lisp/")) |
require 'date' | |
class Calendar | |
def initialize | |
end | |
# start_t and end_t are Ruby DateTime objects in this and other methods | |
# event creation shouldn't cause conflicts | |
# if is_recurring is true, then the event recurs once a day at the given start and end times. In that case, the start and | |
# end times are only used to extract the hour and minute information and not the day information |
I hereby claim:
To claim this, I am signing this object:
a = [1, 1, 1, 2, 3, 3, 4, 4, 4, 4] | |
b = a.uniq | |
counts = b.inject({}) do |memo, key| | |
memo[key] = a.count(key) | |
memo | |
end |
# I am doing this because the server admin forgot to | |
# Renew their certificate! | |
prev_setting = OpenSSL::SSL.send(:remove_const, :VERIFY_PEER) | |
OpenSSL::SSL.const_set(:VERIFY_PEER, OpenSSL::SSL::VERIFY_NONE) | |
# do my connnection thang! | |
OpenSSL::SSL.send(:remove_const, :VERIFY_PEER) | |
OpenSSL::SSL.const_set(:VERIFY_PEER, prev_setting) |
why is New York so expensive | |
why is New York so popular | |
why is New York so dirty | |
why is New York so big | |
why is Los Angeles so popular | |
why is Los Angeles so warm | |
why is Los Angeles so big | |
why is Los Angeles so smoggy | |
why is Chicago so windy | |
why is Chicago so cold |
require 'redcarpet' | |
def test_that_footnotes_work | |
markdown = <<MD | |
This is a footnote.[^1] | |
[^1]: It provides additional information. | |
MD | |
renderer = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :footnotes => true) |