Notes on which tools I use at work daily.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## command prefix | |
unbind C-b | |
set-option -g prefix C-a | |
## better window splitting | |
bind | split-window -h | |
bind - split-window -v | |
unbind '"' | |
unbind % |
Binary | Hex |
---|---|
0000 | 0 |
0001 | 1 |
0010 | 2 |
0011 | 3 |
0100 | 4 |
0101 | 5 |
0110 | 6 |
0111 | 7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. If it's even emit a '0', if it's odd emit a '1'. | |
2. Divide the number by 2 and discard fractional component or remainder. | |
3. If the quotient is 0, the algorithm is done. | |
4. If the quotient is not 0 and the number is odd, insert a '1' before the current string. | |
5. If the quotient is not 0 and the number is even, prefix the string with a '0'. | |
6. Go back to step 2 and repeat. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Print formatted log to console": { | |
"scope": "javascript,typescript,javascriptreact,typescriptreact", | |
"prefix": "log", | |
"body": [ | |
"console.log(`%cDEVLOG --> %O`, 'color:#7bfa61;font-size:14px;font-weight:bold;', $1);", | |
], | |
"description": "Log styled output to console" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. If it can break, it should be tested. This includes models, views, forms, templates, validators, and so forth. | |
2. Each test should generally only test one function. | |
3. Keep it simple. You do not want to have to write tests on top of other tests. | |
4. Run tests whenever code is PULLed or PUSHed from the repo and in the staging environment before PUSHing to production. | |
5. When upgrading to a newer version of Django: | |
a. upgrade locally, | |
b. run your test suite, | |
c. fix bugs, | |
d. PUSH to the repo and staging, and then | |
e. test again in staging before shipping the code. |
Run the following if you are working a single project Django application:
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install Django
$ django-admin startproject personal_portfolio
$ mv <project name>/manage.py ./
$ mv <project name>/<project name>/* <project name>
$ rm -r //
Use a Task if you want to perform a one-off computation or query asynchronously.
Use an Agent if you just need a simple process to hold state.
Use a GenServer if you need a long-running server process that store states and performs work concurrently.
Use a dedicated GenServer process if you need to serialize access to a shared resource or service used by multiple concurrent processes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Write a brief description about the knowledge we have for the system and from that knowledge we’ll make the factor table | |
2. From factor table we’ll write rules (production rules) | |
3. Write those rules in Prolog | |
A *factor table* is a simple table can be made using a excel sheet and is a part of **Knowledge Representation**. | |
*Knowledge representation* is a brief note of the expert system. | |
In factor table we just represent the knowledge we have and this makes it easy for us to write rules and facts. |
NewerOlder