- Published
- Author
- Codemancers
TILs - 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.
- Published
- Author
- Codemancers
https://github.com/sosedoff/pgweb : A great way to connect to postgres without opening port 5432 to general public.\r
\r
We can even add this to Dockup, and boom everyone has access to postgres container and can fiddle directly
\r
We can even add this to Dockup, and boom everyone has access to postgres container and can fiddle directly
- Published
- Author
- Codemancers
How to extract a nested yaml key from a file and write its contents to another file?\r
\r
\r
js-yaml <yaml-file> | jq ".topkey.nestedkey" | js-yaml > output.yaml- Published
- Author
- Codemancers
To avoid diff of package-lock.json in
git show: git show <commithash> ':(exclude)package-lock.json'- Published
- Author
- Codemancers
if you use kaminari(or any pagination) eventually you might want to move to https://github.com/kaminari/kaminari#paginating-without-issuing-select-count-query pagination with just prev and next button. When you have a lot of records, that extra count query might add 100-200ms on page load.
- Published
- Author
- Codemancers
To determine public IP address, use this command
curl -s checkip.dyndns.org- Published
- Author
- Codemancers
jest: When using
mockRejectedValue with axios the data should be inside response.data. Eg: mockRejectedValue({ response: { data: {errors: []} }, status: 400, statusText: "Bad Request" })- Published
- Author
- Codemancers
When using
mockRejectedValue with axios the data should be inside response.data. Eg: mockRejectedValue({ response: { data: {errors: []} }, status: 400, statusText: "Bad Request" })- Published
- Author
- Codemancers
echo $PATH | sed -e $'s/\\:/\\\\\
/'g or echo $PATH | tr ":" "\
" to see each entry in $PATH in separate line.- Published
- Author
- Codemancers
use
:focus-within to keep the parent element visible when focus is on child. Helpful on making dropdown menu.- Published
- Author
- Codemancers
In
jest.fn we can use mockFn.mockRejectedValue and mockFn.mockResolvedValue instead of mockFn.mockReturnValue(Promise.resolve({data: { message: "Failure", count: 1 }}); https://jestjs.io/docs/en/mock-function-api.html#mockfnmockresolvedvaluevalue- Published
- Author
- Codemancers
in rails unscope doesnt used to work with joins/left_joins, but recently has been fixed and backported to 5.1 and 5.0
- Published
- Author
- Codemancers
its better to use
https://gist.github.com/goromlagche/d0305f1bb72ea1d01372fce3c91553d1
date + Time.zone.utc_offset rather than Time.zone.parse(date.to_s) if you are worried about performance\rhttps://gist.github.com/goromlagche/d0305f1bb72ea1d01372fce3c91553d1
- Published
- Author
- Codemancers
"you can use serveo.net to get reusable public endpoints. Example:
ssh -R github:80:localhost:4000 serveo.net"- Published
- Author
- Codemancers
you can use telepresence to connect to a k8s cluster network and do things like start a local debugging session. Here is how to use local elixir observer and debug remote pods in K8S\r
\r
\r
Code
\r
# Install telepresence.\r
# Run this command to get an IEx shell connected to the cluster\r
telepresence --run iex --name debug@127.0.0.1 --cookie <cookie here>\r
# Find all nodes which are part of the cluster and their IP addresses\r
:inet_res.getbyname('dockup-headless', :a)\r
# Connect to one of the nodes\r
Node.connect(:"dockup@<ip>")\r
# Start observer locally\r
:observer.start()\r- Published
- Author
- Codemancers
a bash function to read k8 secrets https://gist.github.com/goromlagche/4415061ee8d6ec342fa967f7fc274296
- Published
- Author
- Codemancers
a bash function to read k8 secrets https://gist.github.com/goromlagche/4415061ee8d6ec342fa967f7fc274296
- Published
- Author
- Codemancers
Elixir refactoring if/else using pattern matching https://gist.github.com/iffyuva/6dbc3d3657e5b1e585c2ce2d53b6c973
- Published
- Author
- Codemancers
Elixir refactoring if/else using pattern matching https://gist.github.com/iffyuva/6dbc3d3657e5b1e585c2ce2d53b6c973
- Published
- Author
- Codemancers
bash stands for : Bourne Again SHellShowing page 30 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.