There are several options to make Date input in Rails application:
- Default inputs from simple_form
- HTML 5 date input
- Text input with jQuery UI Date time picker
- Other plugins for date input with Bootstrap 4
| # NOTE: Be sure to set the API key further down in the code! | |
| require "net/http" | |
| require "uri" | |
| require "json" | |
| class WIP | |
| def initialize(api_key:) | |
| @api_key = api_key | |
| end |
| queryJobs() { | |
| const jobQuery = gql` | |
| query($city: String) { | |
| jobs(city: $city){ | |
| id | |
| title | |
| teaser | |
| imageSmall | |
| published | |
| } |
| // ==UserScript== | |
| // @name News Feed Eradicator for LinkedIn | |
| // @namespace http://miglen.com/ | |
| // @version 0.5 | |
| // @description News Feed Eradicator for LinkedIn | |
| // @author Miglen Evlogiev (hi@miglen.com) | |
| // @match https://www.linkedin.com/* | |
| // @grant none | |
| // @downloadURL https://gist.github.com/miglen/4f1bccf15b63944675d34149dff0bc3d/raw/news-feeds-eradicator-linkedin.user.js#.user.js | |
| // @updateURL https://gist.github.com/miglen/4f1bccf15b63944675d34149dff0bc3d/raw/news-feeds-eradicator-linkedin.user.js#.user.js |
If you're running a Rails app in Google App Engine's flexible environment, it takes a bit of setup to get to a rails console attached to your deployed environment. I wanted to document the steps for my own reference and also as an aid to others.
Open the Google App Engine -> instances section of the Google Cloud Platform (GCP) console.
Select the "SSH" drop-down for a running instance. (Which instance? Both of my instances are in the same cluster, and both are running Rails, so it didn't matter for me. YMMV.) You have a choice about how to connect via ssh.
Choose "Open in browser window" to open a web-based SSH session, which is convenient but potentially awkward.
Choose "View gcloud command" to view and copy a gcloud command that you can use from a terminal, which lets you use your favorite terminal app but may require the extra steps of installing the gcloud command and authenticating the gcloud command with GCP.
First, Create a folder inside of lib called seeds
Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv
Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.
| module Entry::TrackerBlocking | |
| extend ActiveSupport::Concern | |
| included do | |
| has_many :blocked_trackers | |
| end | |
| email_service_blockers = { | |
| "ActiveCampaign" => /lt\.php(.*)?l\=open/, | |
| "AWeber" => "openrate.aweber.com", |
| // source: https://jennamolby.com/how-to-use-cookies-to-capture-url-parameters/ | |
| (function(){ | |
| function getCookie(cname) { | |
| var name = cname + "="; | |
| var decodedCookie = decodeURIComponent(document.cookie); | |
| var ca = decodedCookie.split(';'); | |
| for(var i = 0; i <ca.length; i++) { | |
| var c = ca[i]; | |
| while (c.charAt(0) == ' ') { | |
| c = c.substring(1); |
| https://jennamolby.com/how-to-use-cookies-to-capture-url-parameters/ | |
| let YOUR_DOMAIN = "YOUR_DOMAIN.TLD" // ex: scrapingbee.com | |
| function getParameterByName(name) { | |
| name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); | |
| var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), | |
| results = regex.exec(location.search); | |
| return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); | |
| } |