This document provides guidelines for maintaining high-quality Rust code. These rules MUST be followed by all AI coding agents and contributors.
All code you write MUST be fully optimized.
"Fully optimized" includes:
http://web.archive.org/web/20090918202746/http://tothink.com/mnemonic/wordlist.html
Select a random word:
curl -s https://gist.githubusercontent.com/mjnaderi/73d49c2431eae921340a788d8e6e56f9/raw/words | shuf -n 1
| tasks: | |
| - name: Change reserved blocks to 1 percent on ext4 filesystems that are not / mounted | |
| shell: tune2fs -l {{ item.device }} | egrep "Reserved block count|Block count" | paste -sd\ | awk '{print ($7 / $3 * 100)}' | grep -q 1 || tune2fs -m1 {{ item.device }} | |
| with_items: | |
| - "{{ ansible_mounts }}" | |
| when: item.fstype == 'ext4' and item.mount != '/' | |
| register: tune2fs | |
| changed_when: tune2fs.stdout != "" |
There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket
You may use the same computer for work and personal development and need to separate your work.
When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.
You may have different projects you're working on where you would like to segregate your access.
9 March, 2019
We were discussing with @erusev what we can do with async operation when using useReducer() in our application. Our app is simple and we don't want to use a state management library. All our requirements are satisfied with using one root useReducer(). The problem we are facing and don't know how to solve is async operations.
In a discussion with Dan Abramov he recommends Solution 3 but points out that things are fresh with hooks and there could be better ways of handling the problem.
Ansible has various ways of looking up data from outside sources, including plain text password files, CSV files and INI files. But it doesn't seem to have a lookup for .env files, as used in Laravel projects, also available for PHP, Ruby, Node.js, Python and others.
One option is to launch Ansible with the Ruby dotenv command line script... But that requires Ruby, which seems like overkill to me.
So here is a simpler solution that I use. It consists of:
.env file itself.env file into environment variables - ansible-playbook.sh| def national_code_generator(): | |
| number_list = [] | |
| _sum = 0 | |
| out = "" | |
| for i in reversed(range(2, 11)): | |
| _j = random.randint(0, 9) | |
| number_list.append(str(_j)) | |
| _sum += _j * i | |
| _m = _sum % 11 | |
| if _m < 2: |
| # Adapted from solution provided by http://stackoverflow.com/users/57719/chin-huang http://stackoverflow.com/a/31465939/348868 | |
| # Scenario: You want to add a group to the list of the AllowGroups in ssh_config | |
| # before: | |
| # AllowGroups Group1 | |
| # After: | |
| # AllowGroups Group1 Group2 | |
| - name: Add Group to AllowGroups | |
| replace: | |
| backup: yes |
| #! /bin/bash | |
| sudo apt-get update | |
| sudo apt-get install g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev -y | |
| git clone https://github.com/nghttp2/nghttp2.git && cd nghttp2 | |
| autoreconf -i | |
| automake | |
| autoconf | |
| ./configure --enable-apps | |
| make |
To remove a submodule you need to: