makandra dev

...babysitting Claude Code (default mode) and giving the LLM a loaded gun (bypassPermissions / --dangerously-skip-permissions). When the agent proposes a tool call that requires confirmation, a secondary Claude instance...

...receives it to decide whether to confirm or deny: Generally speaking, reversible, reading commands like git diff are allowed while irreversible commands like an rm -rf are prevented.

engineering.wework.com

...configured timeout. This can become an issue if you rely on the timeout to strike precisely...

medium.com

...when they chose MongoDB?” But what you may not realize is that you are seeing the application as it exists today. When the previous developer (or team) had to develop...

...cloak of opacity. You are cursed with the knowledge of the present, so the system seems like a hackjob of bad decisions...

stackoverflow.com

...event. However, this is not defined by the W3C. Most importantly, Firefox does not support it, neither do recent versions of IE. You should completely avoid accessing the global event...

apidock.com

...are automagically available through accessors on the Active Record object. When you need to specialize this behavior, you may override the default accessors (using the same name as the attribute...

...and simply call the original implementation with a modified value. Example: class Poet < ApplicationRecord def name=(value) super(value.strip) end end Note that you can also avoid the original setter...

With gem dependency it is possible to check the dependencies for your gem before you install it.

github.com

...records of a Ruby on Rails ActiveRecord model to be organised as a tree structure (or hierarchy). It uses a single, intuitively formatted database column, using a variation on the...

...materialised path pattern. It exposes all the standard tree structure relations (ancestors, parent, root, children, siblings, descendants) and all of them can be fetched in a single sql query. Additional...

github.com

An unresponsive service can be worse than a down one. It can tie up your entire system if not handled properly. All network requests should have a timeout.

...You should avoid Ruby’s Timeout module. The default is no timeout, unless otherwise specified. Enjoy...

makandra dev
stdgems.org

Ruby's standard library is in the process of being gemified. It will soon - Ruby 2.5 - consist of RubyGems, which can be updated independently from Ruby. This might mean smoother...

...Ruby upgrades in the future. If breaking API changes happen in standard gems, we can update these before upgrading Ruby...

github.com

The Bullet gem is designed to help you increase your application's performance by reducing the number of queries it...

playbook.cio.gov

The The U.S. Digital Services Playbook is pretty amazing (context...

material.angularjs.org

...to the Polymer project's paper elements collection. Our goal is to provide a set of AngularJS-native UI elements that implement the material design system...

adobe.com

Holly Schinsky from Adobe shows some of Bootstrap's capabilities. The combination of explanation, screenshots and source code makes it easy to understand

ghacks.net

...users will receive update notifications in April offered through the browser’s internal updating service that will update the version to the latest stable build of the browser...

Although regular expression syntax is 99% interchangeable between languages, keep this in mind: By default, the dot character (".") does not match a line feed (newline, line break, "\n") in any...

...use the /s modifier in Ruby. It changes the RegExp to interpret text as Shift JIS encoded which you probably don't want. Javascript There is no modifier to make...

So you want to know if you are on natty, precise, quantal, or something else? Check /etc/lsb-release. $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION...

...can view with crontab -l and edit with crontab -e. You'll need to su to the respective user to view or edit her crontab...

...You very likely have a model that has a delay attribute. You can configure Sidekiq to remove its delay method by adding this to your Sidekiq initializer: Sidekiq.remove_delay!

...you need to keep Sidekiqs delay features, add Sidekiq.hook_rails! before the option above. The sidekiq methods will be prefixed with sidekiq_ then...

...the code below to check whether the browser can make connections to the current site: await isOnline() // resolves to true or false The code The isOnline() function below checks if...

...you can make real requests by re-fetching your site's favicon. If the favicon cannot be downloaded within 6 seconds, it considers your connection to be offline. async function...

...implementation changes. The information below is validated for the current list of browsers we support. By default your html and body elements are only as high as the actual page...

...html and body elements will only be around 40 pixels high, regardless of the size of your browser window. You might be surprised by this, since setting a background on...

...s calc(100 - l)); Here is what happens: from currentColor tells hsl() to start with the value of currentColor. calc(h + 180) rotates the color hue by 180 degrees, i.e...

...to the opposite of the color wheel. s keeps saturation unchanged. calc(100 - l) inverts lightness. For example, 0% becomes 100%, and 100% becomes 0%. Example usage .demo { --inverted-color...

...desktop users may encounter some weird quirks: Aside from allowing only digits and decimal separators, an "e" is also allowed (to allow scientific notation like "1e3"). Non-technical users will...

...be confused by this. Your server needs to understand that syntax. If it converts only digits (e.g. to_i in Ruby) you'll end up with wrong values (like...

jimneath.org

...lists and explains global Ruby "dollar" variables, such as: $: (load path) $* (ARGV) $? (Last exit status) $$ (PID) $~ (MatchData from last successful match) ...and many more you'll need when reading weird...

$1 $2 $3 $4 (match groups from the last pattern match) $& (last matched string) $+ (last match group) `$`` (the string before the last match) $' (the string after the last match...

When building an application that sends e-mails to users, you want to avoid those e-mails from being classified as spam. Most obvious scoring issues will not be relevant...

...to you because you are not a spammer. However, your application must do one thing by itself: When sending HTML e-mails, you should include a plain-text body or...