ANSI escape sequences can be printed to a shell to as instructions. The below is a list of codes I have used often in my CLI programs and I find myself looking up over and over again.
A great article about it can be found here.
ANSI escape sequences can be printed to a shell to as instructions. The below is a list of codes I have used often in my CLI programs and I find myself looking up over and over again.
A great article about it can be found here.
Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.this is a rough draft and may be updated with more examples
GitHub was kind enough to grant me swift access to the Copilot test phase despite me @'ing them several hundred times about ICE. I would like to examine it not in terms of productivity, but security. How risky is it to allow an AI to write some or all of your code?
Ultimately, a human being must take responsibility for every line of code that is committed. AI should not be used for "responsibility washing." However, Copilot is a tool, and workers need their tools to be reliable. A carpenter doesn't have to
<?php | |
// half-hearted CSS minification | |
$css = preg_replace( | |
array('/\s*(\w)\s*{\s*/','/\s*(\S*:)(\s*)([^;]*)(\s|\n)*;(\n|\s)*/','/\n/','/\s*}\s*/'), | |
array('$1{ ','$1$3;',"",'} '), | |
file_get_contents('linked.css') | |
); | |
// embed as a data: uri | |
$base64css = rtrim(strtr(base64_encode($css), '+/', '-_'), '='); |
Some principles and techniques I use in my teams at the moment. I hope these could be helpful for Technical Leads or Product Owners.
Software engineers enjoy solving problems with code. They value understanding why the thing they are working on is important.
For almost all non-trivial tasks, the full scope of dependencies, technical limitations and edge cases only reveal themselves during the development process. For this reason, I try to make the initial planning light touch and focus on the problem to solve. Accepting that we will start the development process before knowing everything can make estimating difficult. Forcing engineers to commit to specific estimates makes them feel that they cannot modify their approach if they learn something through the process of doing. Here are some reasons engineers can struggle with estimating and what can be done to help.
This is a quick function that can convert a QR code generated with the rust version of QR-Code-generator into a much smaller SVG than the to_svg_string
function included in their example.
The function is made generic so that you may use this function with other qr sources. All the function needs is a method to check coordinates if they contain a block box or not besides the size and border values.
So if you have the data for your QR code, all you need is to write a method as I did in the FakeQr
struct for the tests.
The SVG optimizations: