Migrate, e.g. organisation.logo (Carrierwave "LogoUploader") to organisation.logo2 (ActiveStorage)
require 'migrate_attachment'
migrate_attachment!(
klass: Organisation,
attachment_attribute: :logo,
carrierwave_uploader: LogoUploader, | # District - Pune, Date - Today's date. You can modify it as per your requirement. | |
| uri = URI.parse("https://cdn-api.co-vin.in/api/v2/appointment/sessions/public/calendarByDistrict?district_id=363&date=#{Date.today.strftime('%d-%m-%Y')}") | |
| results = Net::HTTP.get(uri) | |
| results = JSON.parse(results).with_indifferent_access | |
| availability = {} | |
| results[:centers].each do |center| | |
| # 1st condition - Checking Age | |
| sessions = center[:sessions].select{ |c| c[:min_age_limit] == 18 } |
| Disable Laptop Keyboard in Ubuntu | |
| Taken From :- https://blog.hostonnet.com/laptop-keyboard-ubuntu | |
| To disable laptop built in keyboard in Ubuntu, first you need to identify the device id for keyboard. | |
| Now run xinput –list command to get list of all input devices | |
| hostonnet@pc4:~$ xinput --list | |
| ⎡ Virtual core pointer id=2 [master pointer (3)] |
| async function generateKey() { | |
| return await crypto.subtle.generateKey({ | |
| "name":"AES-GCM", | |
| "length":256 | |
| },true,['encrypt','decrypt']); | |
| } | |
| async function exportKey(key) { | |
| return await crypto.subtle.exportKey('jwk', key); | |
| } |
| <div class="container"> | |
| <% flash.each do |type, msg| %> | |
| <div class="alert <%= bootstrap_class_for_flash(type) %> alert-dismissable fade show"> | |
| <%= msg %> | |
| <button class="close" data-dismiss="alert">x</button> | |
| </div> | |
| <% end %> | |
| </div> |
#Getting Started
##Webpage:
<html>
<head>
<title>Testing with Ruby and Selenium WebDriver</title>
</head>
<body bgcolor="antiquewhite">
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000