- Published
- Author
- Sujay
atob() function decodes a string of data which was encoded using Base64 encoding and btoa() method encodes the dataAt Codemancers, we believe every day is an opportunity to grow. This section is where our team shares bite-sized discoveries, technical breakthroughs and fascinating nuggets of wisdom we've stumbled upon in our work.
atob() function decodes a string of data which was encoded using Base64 encoding and btoa() method encodes the dataActiveSupport::TimeZone.all which likely fetches a list of available time zones supported by the ActiveSupport library in rails.Date::ABBR_DAYNAMES, which is an array containing abbreviated names of the days of the week (e.g., ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]). This array is provided by Ruby's Date class, making it convenient for developers to access the names of the days without manually typing them out.Ctrl+Shift+P (Windows) or Cmd+Shift+P (macOS).Fold Level 1: Now, only the main parts of our code will be visible.git clone <GitLab-repository-URL>
cd <repository-name>git remote add github <GitHub-repository-URL>git pull github maingit push github mainResolving blocked host:config.hosts.clear to config/environments/development.rb in your Rails project. This disables the functionality in the development environment, allowing requests from ngrok.gem unpack GEMNAME.Tailscale in local device and serve your localhosttailscale CLI using brew install tailscale tailscale serve 3000 (you might get some warning regarding client and server version mismatch)Serve is not enabled on your tailnet. and ask you to visit https://login.tailscale.com/f/serve?node=<node-id>rails db:migrate , it will throw the below errorPG::DatatypeMismatch: ERROR: column "tags" cannot be cast automatically to type jsonb
HINT: You might need to specify "USING tags::jsonb".tags field from type string to jsonbUSING tags::jsonb and cast the type.class ChangeTagsToJsonbInTils < ActiveRecord::Migration[7.0]
def change
change_column :tils, :tags, 'jsonb USING CAST(tags AS jsonb)'
end
endStep 1: Download the latest version of the Postgres image :docker pull postgresStep 2: Create and Run Postgres Container :docker run -d --name -p 5432:5432 -e POSTGRES_PASSWORD= postgresStep 3: Verify Executing Container :docker psStep 4: Interact with Executing Container :docker exec -it bashStep 5: Connect to Postgresql Database Server :psql -h localhost -U postgresStep 6: Create Postgresql Database :CREATE DATABASE ;
\lStep 7: Establish a connection with database :\cStep 8: Create Database User :CREATE USER with PASSWORD ;Step 9: Exit :\qcall method handles the initial request and generates a response, but it does not control subsequent redirects initiated by external services. If an external service, such as Slack's OAuth, triggers additional redirects after your application responds, modifying headers for those redirects within the same call method may not be directly achievable. Handling subsequent redirects may require alternative approaches, such as additional middleware or different parts of your application's code.Showing 29 to 31 of 82 results
Codemancers can bring your vision to life and help you achieve your goals