At 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.
Published
Author
Satya
forms in rails 7 are now submitted with turbo_stream format. for eg: from the logs: Started POST "/books" for 127.0.0.1 at 2024-02-16 14:44:16 +0530 Processing by BooksController#create as TURBO_STREAM
To remove rvm and its traces, you can use the rvm command itself: rvm implode This command will remove all traces of rvm from your system.
Published
Author
Satya
difference between oauth/v2/authorize & openid/connect/authorize I am taking the example in context of Slack . 1. OAuth 2.0 (/oauth/v2/authorize): • Usage: When a third-party application needs to access a user's resources in Slack, it uses the /oauth/v2/authorize endpoint. • Process: The user is prompted to grant the application permission to access their resources. Upon consent, Slack returns an authorization code to the application. This code is then exchanged for an access token, which the application uses to access the user's resources on Slack. • Focus: Purely on granting access to resources (authorization). 2. OpenID Connect (/openid/connect/authorize): • Usage: When an application not only needs to access resources but also verify the identity of the Slack user, it uses the /openid/connect/authorize endpoint. • Process: Similar to OAuth 2.0, but in addition to granting access, this process authenticates the user and returns an ID token along with an authorization code. The ID token contains claims about the user's identity, which can be used by the application to verify who the user is. • Focus: On both verifying user identity (authentication) and granting access to resources (authorization).
Published
Author
Codemancers
Launching an NGINX pod imperatively (directly from the command line) can be done using the kubectl run nginx-pod --image=nginx --restart=Never
Published
Author
Nisanth
Ensure that Docker Desktop is running before executing the docker build command.
Published
Author
Nisanth
Redis Cache : One of the most common use cases for Redis is caching frequently accessed data to reduce the load on databases and speed up response times
Published
Author
Soniya Rayabagi
export TF_LOG=DEBUG this sets the TF_LOG environment variable to DEBUG, instructing Terraform to output detailed debug logs during its execution( Terraform apply ). unset TF_LOG this unsets (removes) the TF_LOG environment variable, effectively turning off debug logging for Terraform execution.
Published
Author
Soniya Rayabagi
terraform workspace show command is used to display the name of the current workspace. terraform workspace new <name> command is used when you want to create new workspace. terraform workspace list command used to list all the workspaces. terraform workspace select example1 can switch between the workspaces.
Published
Author
Soniya Rayabagi
The docker-compose up command starts and runs all the services defined in a docker-compose.yml file, creating and starting containers. docker-compose up -d command which starts the containers in the background and leaves them running (daemon processes) .
Published
Author
Soniya Rayabagi
"terraform init -backend-config=backend.hcl" command initializes your Terraform directory and configures its backend according to the settings specified in the backend.hcl file, for managing infrastructure. then , If you wish to attempt automatic migration of the state, use the command "terraform init -migrate-state"
Published
Author
Nisanth
Jenkins is a self-hosted CI/CD automation server, serving as an alternative to cloud-based services like GitHub Actions
Published
Author
Ayush
Related to Auth0 and react-auth0 sdk To add a custom parameter to the authentication endpoint of which auth0 interacts we can pass it like this in the object
authorizationParams object is used in methods loginWithRedirect, withAuthenticationRequired provided by @auth0/auth0-react
once the custom parameter is passed we can see it in /authorize endpoint when we open the Universal login or signup form from Auth0
If we want to take any custom actions based on this custom parameter we can access it in Auth0 post login custom actions
Published
Author
Nisanth
The docker build -f command is used to specify the name of the Dockerfile to use for building a Docker image. This flag allows you to specify the path to the Dockerfile that you want to use for building the image. However, if you have a Dockerfile with a different name or located in a different directory, you can use the -f flag followed by the path to the Dockerfile.
Published
Author
Soniya Rayabagi
Storing Terraform State in S3 with Encryption and DynamoDB Locking , instead of Storing locally : To improve security , you can configure Terraform to store its state file in an AWS S3 bucket with encryption and use DynamoDB for state locking. This setup prevents local state file risks, enables team access, and avoids state conflicts.
act utility can be used to simulate GitHub Actions locally, for testing the GitHub workflows.
To install act on Mac: brew install act To use the act navigate to the GitHub repo and use act -l to list all jobs To run any particular job: act -j job_id To run a job on any particular platform: act -j job_id -P <image>
[To run the jobs locally, docker must be running on the system.]
Published
Author
Soniya Rayabagi
square brackets [ ] indicate that the entire expression within them is optional example : FROM [--platform=<platform>] <image> [AS <name>] here , you can choose whether or not to include the --platform=<platform>
Published
Author
Satya
When ActiveJob is set to :inline it does not depends upon a scheduler anymore. Use perform_later as per your requirements and that will perform the job instantly.
Published
Author
Sachin Kabadi
System Analyst
If you face error as " Sprockets::Rails::Helper::AssetNotFound: The asset "tailwind.css" is not present in the asset pipeline " while running CI/CD pipeline or during deployment, then check whether you have add the the "app/assets/builds/*" in gitignore. Remove it and precompile assets again using "rake assets:precompile" or "rails assets:precompile". Make sure "tailwind.css" file exists in "app/assets/builds/" folder.
Published
Author
Satya
while running psql postgres if we face the below error: psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory That can be because of 2 reasons. 1. Your service isn't running , that can be fixed using brew services start postgresql@15 2. Your service is running , but there is some error like
Code
Bootstrap failed: 5: Input/output errorTry re-running the command as root for richer errors.Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/<user>/Library/LaunchAgents/[email protected]` exited with 5.
We can fix the 2nd error by removing the process pid file. • Step 1 -> brew services stop postgresql@15 • Step 2 -> rm -f /opt/homebrew/var/postgresql@15/postmaster.pid (apple sillicon install it at opt/homebrew) • Step 3 -> brew services start postgresql@15 These 3 steps should fix the error and we can check the info by running brew services info postgresql@15
Showing page 16 of 42
Your competitors are already using AI. The question is how fast you want to unlock the value.
Don't know where to start?
AI is everywhere but it's unclear which investments will actually move your metrics and which are expensive experiments.
Your data isn't ready
Most AI projects fail at the data layer. Pipelines, quality, access all need work before LLMs can deliver value.
Internal teams are stretched
Your engineers are shipping product. They don't have capacity to also become AI specialists with production-grade experience.
Legacy systems block everything
Aging, undocumented codebases make AI integration slow, risky, and expensive. They need to move first.