18,709 Matching Annotations
  1. Last 7 days
    1. The indentation of the remaining lines can be corrected with other cops such as IndentationConsistency and EndAlignment.
    1. One thing for the impatient: after the program displays number of messages in both accounts, it seems that it has hung up. But it does something in the background and one has to wait a longer while before it starts displaying info about copied messages.
    1. Good feedback is always welcome! and bad feedback is very often welcome It may sounds crazy but I do reply personally to every single email message I receive, so don't hesitate to spend time writing to me about your email problems, you're sure to get my attention and my time.

      personally replies to every single email message they receive

    1. --stop-after-configfile-check
    2. Kamatera is a very good option to run a mail server because They don’t block port 25, so you can send unlimited emails (transactional email and newsletters) without spending money on SMTP relay service. Kamatera doesn’t have any SMTP limits. You can send a million emails per day. The IP address isn’t on any email blacklist. (At least this is true in my case. I chose the Dallas data center.) You definitely don’t want to be listed on the dreaded Microsoft Outlook IP blacklist or the spamrats blacklist. Some blacklists block an entire IP range and you have no way to delist your IP address from this kind of blacklist. You can edit PTR record to improve email deliverability. They allow you to send newsletters to your email subscribers with no hourly limits or daily limits, whatsoever. You can order multiple IP addresses for a single server. This is very useful for folks who need to send a large volume of emails. You can spread email traffic on multiple IP addresses to achieve better email deliverability.
    1. Mass electronic surveillance by governments revealed over the last several years has spurred a new movement to re-decentralize the web, a movement to empower individuals to be their own service providers again.
    1. If you are watching this show with non-Chinese subtitles you are massively missing out. The Chinese dialogue is written with the skill of a bard. The language is sophisticated, succinct, elegant and poetic - as beautiful as the visuals. In comparison, the English subtitles were dull and prosaic, an abominable shadow of the original dialogue, using the vocabulary of a primary school student. It's as if the varying shades of blue - cerulean, sapphire, teal, indigo were translated into "blue, blue, blue, blue". I was truly disappointed by the English subtitles
    1. This allows reading your email offline without the need for your mail reader (MUA) to support IMAP operations. Need an attachment from a message without internet connection? No problem, the message is still there.
    2. IMAP's main downside is that you have to trust your email provider to not lose your email.
    1. Modoboa is an alternative to those 3 options. It frees you from dependence on email providers and makes accessible to all the creation his own secure email server.
    2. use the services of free email providers (Gmail, Live, Yahoo...) which are limited and your data is used for commercial purposes. Install your own email server, which requires important technical knowledge to setup and configure the system.
    1. Besides that ffscreencast can act as an ffmpeg command generator. Every available option can also just show the corresponding ffmpeg command instead of executing it. Non-ffmpeg commands, such as how the camera resolution is pulled and others can also be shown instead of being executed.
    2. allows fool-proof screen recording via the command line
    3. a shell wrapper for ffmpeg
    1. Inspect the proposed changes in the pull request and ensure that you are comfortable running your workflows on the pull request branch. You should be especially alert to any proposed changes in the .github/workflows/ directory that affect workflow files.
    1. Exclude and include rules are resolved relative to the root of the transfer, but finding rule files (e.g. --exclude-from='exclude-list') is done relative to the working directory of the rsync process (which it inherits from the process that ran it).
    1. For example, still not over the death of Google Reader after all these years? Why not host your own RSS aggregator like Sismics Reader that nobody can ever take away from you?
    2. Self-hosting is when you---either using a computer on your local network at home or a remote "bare metal" server host you've purchased---host your own services for various purposes.
    1. In the author’s view, using a combination of content-addressing, signed content, and petnames would help decentralise that layer. It keeps centralisation around aggregators (because of the scarcity of attention), but mitigates their harmful lock-in.
    2. “Perhaps there is a rule of thumb here? If you decentralize, the system will recentralize, but one layer up. Something new will be enabled by decentralization. That sounds like evolution through layering, like upward-spiraling complexity. That sounds like progress to me.”
    3. “But our everyday reality using the computer does not feel empowering. You want to use the internet without being tracked? Almost impossible. Want to message a friend? I hope you have read and agree to the WhatsApp Terms of Service and Privacy Policy. Want to install some software on your Apple device? It better be in the App Store. Perhaps you want to lend an Amazon eBook to your sister? Well you don’t actually own it, so you’ll have to ask Amazon.”
    1. "All skill, no luck. There may be dice, but they're not for rolling. Beating your opponent is pure skill."

    1. You do not need to buy the expensive Cascade Plus surfactant. You can use any clear shampoo you can find at Dollar Tree. The application rate is 3 ounces per 1,000 square feet. If you have 2,000 square feet to spray, put 6 ounces of shampoo into a hose-end sprayer, fill the jug carefully with water, and spray it out as evenly as you can over the entire yard. If you use too much, no problem. A friend of mine sprayed at 64 ounces per 1,000 and never had a problem. So spray your yard and follow that up with 1/2 to 1 inch of rain or irrigation. Wait 3 full weeks for the magic to happen. Once it does you will find that after a rain or deep irrigation the soil will become unsettlingly soft and it will return to very firm/hard underfoot when the soil dries out.

      This is not my rant alone. I’m simply conveying what is well known in some of the better lawn care forums online. I did not believe in the shampoo treatment until I tried it. Before that all I knew was that core aeration did nothing for my lawn. So I spent a dollar on some cheap shampoo, and it worked way beyond my expectations. Also one treatment seems to last for many years as long as you don’t neglect watering for many weeks during a very hot/dry summer.

    1. It is open sourced and you can find it at https://github.com/digitalocean/droplet-agent
    2. The above diagram depicts the details of a session creation.
    3. Since the Console UI is a web-based app running on the customer’s browser, there are a few challenges we had to overcome due to the limitation set by the browser environment. Typically, the SSH protocol runs over a TCP connection. However, a raw TCP connection isn’t allowed by most browsers.  Moreover, even if we had a way to support a direct TCP connection from within the browser, the Console UI still would not be able to connect to the target Droplet due to CORS limitation unless we assigned every Droplet a sub domain that complies with the CORS requirements, which is impractical.
    4. When building the Droplet Console, we had a few options to support SSH keys-based authentication. The most straightforward way would be to directly allow the customer to specify a private key that is already set up for accessing the Droplet. However, there are some problems with this solution:
    1. the Senate passed the bill by unanimous consent, although several senators stated later that they would have objected if they had known that the bill could pass

      This doesn't make sense. Why would you vote for it if you object for it? Just vote what you really mean.

  2. Sep 2023
    1. commands="\nthing1@this is thing 1\!\nthing2@this is thing 2!" while read line;do // do your stuff here line <<< $( echo -e "${commands}" )

      Seems to work. Not used to the <<< expression...

    2. -e switch tells the echo command to honour all back slashes . The same behaviour can be achieved with `shopt -s xpg_echo` ( you have to remove -e switch whenever you do that )
    3. Starting in bash 4.4, you can use ${input@E} in place of $(echo -e "$input").
    1. I am a developer, mainly on embedded systems, with a computer science background and security and cryptography leanings by trade. I also have interests in various other topics.
    1. Using quotes for i in "$(cat $1)"; results in i being assigned the whole file at once. What should I change?
    2. files with characters after the last newline are not text files, and those characters don't constitute a line. In many cases those bogus characters are better left ignored or removed, though there are cases where you may want to treat it as a extra line, so it's good you show how.
    3. (9 years later:)Both provided answers would fail on files without a newline at the end, this will effectively skip the last line, produce no errors, would lead to disaster (learned hard way:).
    4. Answers are identical because Questions are identical too !
    1. If IFS is unset, or its value is exactly <space><tab><newline>, the default, then any sequence of IFS characters serves to delimit words. If IFS has a value other than the default, then sequences of the whitespace characters space and tab are ignored at the beginning and end of the word, as long as the whitespace character is in the value of IFS (an IFS whitespace character). Any character in IFS that is not IFS whitespace, along with any adjacent IFS whitespace characters, delimits a field. A sequence of IFS whitespace characters is also treated as a delimiter. If the value of IFS is null, no word splitting occurs.
    1. Also, always prefix globs with "/" or "./"; otherwise, if there's a file with "-" as the first character, the expansions might be misinterpreted as options.
    1. Don’t send test phishing messages or test campaigns from your domain. Your domain’s reputation might be negatively affected, and your domain could be added to internet blocklists.

      What does a test compaign mean exactly? Can't I send test messages without fear? Isn't sending tests essential prior to sending a live message to all recipients?

    1. if at all possible, you should send MIME attachments instead, unless you specifically strive to be able to communicate with the late 1980s.
    2. Back in the day, the de facto standard for sending binaries across electronic mail was uuencode. It still exists, but has numerous usability problems; if at all possible, you should send MIME attachments instead, unless you specifically strive to be able to communicate with the late 1980s.
    1. There is actually no meaningful distinction between a hostname which happens to be a second-level domain and a hostname which has more parts than that. You can even have a machine at a top-level domain if you happen to be a small country or otherwise are able to create an A record for one.
    1. The host itself does not handle the actual FQDN. That is handled by the DNS. FQDN (Fully Qualified Domain Name) is handled by DNS translating names into IP addresses. Using the /etc/hosts file, you are essentially overriding the DNS server.
    1. To ensure your messages pass the DMARC check with flying colors, you'll need to make certain the domains listed in the From, Sender, and Mail-From headers match each other exactly. That is, the domain listed in the From header is the exact actual sending domain.
    2. For example, if your sending domain is ABCdomain.com, but your From field shows 123domain.com instead, you will almost certainly run into DMARC issues. Sometimes, even the difference between mail.ABCdomain.com and ABCdomain.com is sufficient for a server to place your message in a spam folder. We make sure that our Email Best Practices are clear that the domain listed in the From header and the actual sending domain should match for exactly this reason.
    1. Note that the mere presence of this header causes premailer to be skipped, i.e., even setting skip_premailer: false will cause premailer to be skipped. The reason for that is that the skip_premailer is a simple header and the value is transformed into a string, causing 'false' to become truthy.

      They should fix this!

      lib/premailer/rails/hook.rb def skip_premailer_header_present? message.header[:skip_premailer] end

    1. sums = [0] (1..gains.length).each do |i| sums[i] = sums[i - 1] + gains[i - 1] end could, if scan was introduced, be replaced with: sums = gains.scan_left(0, &:+)
    2. I'd even go as far as saying each_with_object is often less readable than using a captured variable.

      elaborate? what is a captured variable? I assume he means the val = 0 from outside the scope of the block, which was "captured" in the closure.

    3. I think "purely functional, not a single re-assigned variable" often introduces significant extra complexity, when Ruby is a language that embraces both functional and imperative programming.
    4. One of my favorite aspects of Ruby is how easy it is to write in a functional programming style, and including the scan operation would expand the number of use cases covered by functional methods.
    5. each_with_object is only useful if mutating some object (typically an Array or Hash).

      typically true... is it always true?

    6. I think this is the crux of the issue. Because #inject needs to evaluate every element in order to return a meaningful value, it can't be partially evaluated. The "scan" operation allows for partial evaluation.
    7. I think there are real-world use cases! Would you consider converting a history of transactions into a history of account balances a valid use-case? That can be done easily with a scan. For example, if you have transactions = [100, -200, 200] then you can find the history of account balances with transactions.scan_left(0, &:+) # => [0, 100, -100, 100].
    1. Circuit representation of a work-efficient 16-input parallel prefix sum
    1. The key differences between #inject and #scan_left are: Incremental results: #scan_left returns a series of results after processing each element of the input series. #inject returns a single value, which equals the final result in the series returned by #scan_left. Laziness: #scan_left can preserve the laziness of the input series. As each incremental result is read from the output series, the actual calculation is lazily performed against the input. #inject cannot be a lazy operation in general, as its single result reflects a calculation across every element of the input series.
    1. def self.make_lazy(*methods) methods.each do |method| define_method method do |*args, &block| lazy.public_send(method, *args, &block) end end end
    2. I want the fact that my collection is lazy to be an implementation detail.
    1. In order to enable MPP, users must have Apple devices, configure their email account to use Apple Mail applications, update their operating system to the latest version, and opt into MPP. 
    1. In other words, when a recipient clicks the “unsubscribe” link in your email, the recipient’s mail client will send an email to this address. It is your responsibility to receive and process these generated emails.
    2. You must include at least the mailto portion of the List-Unsubscribe header, since some services only support this portion (iOS, for example). However, many inbox providers and mail clients honor both methods. To ensure that the greatest number of your recipients have the ability to unsubscribe from your emails, thus protecting your reputation as a sender, we recommend including both mailto and http.
    3. You must include at least the mailto portion of the List-Unsubscribe header, since some services only support this portion (iOS, for example). However, many inbox providers and mail clients honor both methods. To ensure that the greatest number of your recipients have the ability to unsubscribe from your emails, thus protecting your reputation as a sender, we recommend including both mailto and http.
    4. It is possible to use the List-Unsubscribe header even if you do not want to use subscription tracking. This is useful for users who want to provide their recipients an easy way to unsubscribe from their emails without relying on SendGrid’s tracking features. Continue reading below for an explanation of the List-Unsubscribe header, and how you can use it when sending email via SendGrid.
    5. List-Unsubscribe is a small piece of text that can be inserted in the header section of your email. The List-Unsubscribe header will insert an “unsubscribe” button, or link, next to the From address at the top of your email. A recipient can click this link to notify you that they would like to unsubscribe from your emails.
    1. List-unsubscribe can help reduce spam complaints.If subscribers can’t find the unsubscribe link, they may click the spam reporting button instead. This could hurt your email deliverability and sender reputation. To mailbox providers, a spam complaint is a spam complaint, regardless of whether the recipient actually perceived the message as malicious.
    2. Support for list-unsubscribe varies across email clients.
    1. If anything in this policy does not fit with your own local policy, you should not use dnswl.org for whitelisting or similar purposes.
    1. Apparently, Google uses some additional heuristics to decide whether the link should be displayed or not. The List-Unsubscribe header could be abused by spammers to validate that their target got the message, and thus, GMail only shows the unsubscribe link if the source of the message has accumulated sufficient trust.

      Shouldn't it be controllable by the end user, in the same way that they can press a button to show all images if images are blocked by default for security/privacy reasons??

    1. DKIM has proven to be a highly effective means by which a receiver can verify that the signed fields of an email have not been modified in transit. DKIM is as secure as the weakest link - the private key, though. The private key of a DKIM keypair is vulnerable to being stolen if an attacker is able to compromise the system in which it is stored. Therefore, to minimize the risk of active DKIM keys being compromised, they should be changed frequently. This is a practice known as DKIM key rotation. Each time a key is rotated, a new {selector, private key, public key} tuple is created. Then the public key will need to be published in the DNS, and you need to re-configure the outgoing email server to use the new private key. After this is done, the outgoing email server will use the new private key to sign all outgoing email messages.
    2. Multiple private/public key pairs are required due to the following reasons: DKIM key rotation which we will explain in the next section; setting up DKIM with multiple email delivery services on a single domain; each service can have their own separate selectors so that signing/verifying with one service doesn't interfere with that with another.
    3. a tuple { selector, private key, public key } is created
    1. A record can be viewed as the computer analog of a mathematical tuple, although a tuple may or may not be considered a record, and vice versa, depending on conventions and the specific programming language.
    2. An object in object-oriented language is essentially a record that contains procedures specialized to handle that record; and object types are an elaboration of record types. Indeed, in most object-oriented languages, records are just special cases of objects, and are known as plain old data structures (PODSs), to contrast with objects that use OO features.
    3. A record type is a data type that describes such values and variables.
    4. In type theory, product types (with no field names) are generally preferred due to their simplicity
    1. Most typed functional programming languages implement tuples directly as product types