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.
- do not modify instance variables of a singleton class, not thread safe. furthermore no instance variables, only class variables.
- Parameterize specs for fun https://github.com/HypothesisWorks/hypothesis
- http://privacy.cis.upenn.edu/ - How to improve data sharing with privacy in mind.
- Kubernetes jobs can be configured with
ttlSecondsAfterFinishedto clean up finished jobs automatically. - https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#clean-up-finished-jobs-automatically - a small elisp snippet to generate class name for ruby files. can be modified for other langs too\r
https://gist.github.com/goromlagche/0c53ef2cbee35a14dee34e9029c71116 - 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 - How to extract a nested yaml key from a file and write its contents to another file?\r
\rjs-yaml <yaml-file> | jq ".topkey.nestedkey" | js-yaml > output.yaml - To avoid diff of package-lock.json in
git show:git show <commithash> ':(exclude)package-lock.json' - 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.
- To determine public IP address, use this command
curl -s checkip.dyndns.org - jest: When using
mockRejectedValuewith axios the data should be insideresponse.data. Eg:mockRejectedValue({ response: { data: {errors: []} }, status: 400, statusText: "Bad Request" }) - When using
mockRejectedValuewith axios the data should be insideresponse.data. Eg:mockRejectedValue({ response: { data: {errors: []} }, status: 400, statusText: "Bad Request" }) echo $PATH | sed -e $'s/\\:/\\\\\ /'gorecho $PATH | tr ":" "\ "to see each entry in$PATHin separate line.- use
:focus-withinto keep the parent element visible when focus is on child. Helpful on making dropdown menu. - In
jest.fnwe can usemockFn.mockRejectedValueandmockFn.mockResolvedValueinstead ofmockFn.mockReturnValue(Promise.resolve({data: { message: "Failure", count: 1 }});https://jestjs.io/docs/en/mock-function-api.html#mockfnmockresolvedvaluevalue - in rails unscope doesnt used to work with joins/left_joins, but recently has been fixed and backported to 5.1 and 5.0
- its better to use
date + Time.zone.utc_offsetrather thanTime.zone.parse(date.to_s)if you are worried about performance\r
https://gist.github.com/goromlagche/d0305f1bb72ea1d01372fce3c91553d1 - "you can use serveo.net to get reusable public endpoints. Example:
ssh -R github:80:localhost:4000 serveo.net"
Showing 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.
Don't worry. We've got you covered.
Start with the audit.