git stash want to store commit temporarily then , stashing will save your modifications and revert your working directory to its clean stateTILs
Fueling Curiosity, One Insight at a Time
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.
- SAP is divided into two types of data:
• Master Data - Consists product data , person data (eg: vendor, customer) or place data.
• Transaction Data - Consists of quotation , sales order , good issue, good receipt , invoice.
#SAP - Docker Hub & Pushing Docker Images
• Why We Need Docker Hub: Docker Hub is like a social media platform, but instead of sharing photos or updates, we share Docker images. Docker Hub provides a centralized place for storing and managing these images. We use Docker Hub to:
◦ Share our Docker images with others.
◦ Store different versions of our Docker images.
◦ Access our Docker images from any machine, making deployment and scaling much easier.
◦ Find and use Docker images created by others, which can be very helpful.
• How to Push a Docker Image to Docker Hub: To push a Docker image, we follow a few simple steps:
a. Log In: Just like logging into your favorite app, we log in to Docker Hub on our computer.
b. Tagging: We give our image a label (or a tag) that describes what it is and which version it is—kind of like tagging a friend in a photodocker tag flix-rails:latest nishanthmathiyazhagan/flix-rails:latest
c. Pushing: With our image tagged, we ‘push’ it to Docker Hub, which means uploading it so others can download and use it.docker push nishanthmathiyazhagan/flix-rails:latest
• What Happens After Pushing the Image to Docker Hub: Once the image is pushed:
◦ It’s stored in our Docker Hub repository,
◦ Other people can ‘pull’ the image to their own computers or servers to run the application it contains.
◦ If we update the application, we can push the new version to Docker Hub so everyone can get the update.
◦ We can pull it down on any server
#devops #docker - Sidekiq Capsule allows to configure queues to execute jobs serially.
Before Sidekiq version 7, to manage dependencies between jobs, a delay was often manually set withset(wait: 30.seconds)to ensure the sequential execution of dependent jobs. This can be achieved now by setting their concurrency to 1.Ruby
Sidekiq.configure_server do |config| config.capsule("capsule") do |cap| cap.concurrency = 1 cap.queues = %w[capsule-queue] end end
#rails #sidekiq - Use pluck to fetch only the necessary columns if you don't need the entire object
This reduces memory usage and database load
For exampleCode
adults = User::User.where("age > ?", "18").pluck(:name)
The above code will return an array of name of users who are above age of 18
#rails #db ps aux | grep defunctdisplays information about any zombie processes (that have completed execution but still have an entry in the process table with specific PID because, their parent process has not yet collected their exit status) currently running on the system.
#devops- When eslint is not working on your repository in local for any reason you can try restarting the ES Lint Server on VS Code, and if the issue is cause cause server is not reading the config from root directory you can set
root: truein your eslint config file, that should resolve the issue. And to fix all your lint issue in a single commit you can use commandnpx eslint . --fix.
#javascript #eslint - Rails
db:preparecommand follows these steps:
1. It first attempts to rundb:migrateto apply any pending migrations. This step ensures that the database schema is up to date with the latest changes defined in your migration files.
2. If the database does not exist, it falls back todb:setupto create the database, load the schema, and seed it with initial data. This step is crucial for setting up a new database or ensuring that an existing database is correctly initialized.
In summary,rails db:prepareis a powerful command for ensuring your database is ready for use in your Rails application
#rails - The rails plugin command simplifies plugin management. Plugins can be installed by name or their repository URLs. You need to have Git installed if you want to install a plugin from a Git repo.
$ rails plugin install https://github.com/countries/countries.git
#rails #gem - Consumable products does not have certain properties such as
On Hand&Forecastedwhile Storable products has it.
Reason being, storable product needs accurate inventory tracking where as consumable product focuses on purchase and expense records without maintaining detailed inventory levels. - To create products in odoo.
• Navigate to Products > Products
• Click on "New" and fill in the necessary details like product name, sales price, cost, product type and any other relevant information.
• Click on "Save".
And now the product will be available in the Inventory Adjustment for us to add in stock.
#inventory-management #wms #odoo Delivery Orderin Odoo is used for sending goods from warehouse to customer and external parties, to transfer between warehouses useInternal Transfersin Odoo.
#inventory-management #wms #odoo- If using Podman (instead of Docker for Mac) and trivy for image scanning, trivy expects DOCKER_HOST env variable to be setup for scanning local images and fails unless DOCKER_HOST is pointing to the podman socket.
Fix:Code
$ export DOCKER_HOST="unix://$(podman machine inspect --format '{{.ConnectionInfo.PodmanSocket.Path}}')" $ trivy image image_name
#docker #devops atob()function decodes a string of data which was encoded using Base64 encoding andbtoa()method encodes the data- •
ActiveSupport::TimeZone.allwhich 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. - While exploring a lengthy code file, we often need to see the available properties and methods without diving into their implementation. In VS Code, this is quite easy with "Fold Level 1" functionality. This feature collapses the code to display only the top-level structures, which makes it easier to understand the file's architecture without getting into the details.
To Use Fold Level 1:
1. Open Command Palette:Ctrl+Shift+P(Windows) orCmd+Shift+P(macOS).
2. SelectFold Level 1: Now, only the main parts of our code will be visible.
#vs-code, #coding - Migration of a Repository from GitLab to GitHub:
1. Clone the GitLab Repository LocallyCode
git clone <GitLab-repository-URL> cd <repository-name>
2. Add the GitHub Repository as a RemoteCode
git remote add github <GitHub-repository-URL>
3. Resolve any merge conflicts that may arise using rebase after pullCode
git pull github main
4. Push from your local repository to the GitHub repositoryCode
git push github main Code
Resolving blocked host:
The Blocked Host is a new feature of Rails 6. To resolve the Blocked Host error in rails, addconfig.hosts.cleartoconfig/environments/development.rbin your Rails project. This disables the functionality in the development environment, allowing requests from ngrok.
#host-block-issue, #rails- Extract the source code of the gem to a local directory by using the command
gem unpack GEMNAME. - Setup
Tailscalein local device and serve your localhost
1. Intsall tailscale from https://tailscale.com/download for your device.
2. Sign up and follow the steps so that your device gets connected.
3. Open your terminal and downloadtailscaleCLI usingbrew install tailscale
4. Runtailscale serve 3000(you might get some warning regarding client and server version mismatch)
5. It will sayServe is not enabled on your tailnet.and ask you to visithttps://login.tailscale.com/f/serve?node=<node-id>
6. In that link enable the option , and that's it , it will serve your port 3000 successfully.
#tailscale , #devops
Showing page 15 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.
Don't worry. We've got you covered.
Start with the audit.