Notes by Craig Phillips
- There are 11 fallacies of Distributed Computing:
- The network is reliable
- Latency isn’t a problem
- Bandwidth isn’t a problem
- The network is secure
- The topology won’t change
In the other file of this gist I detail why we should use struct{} as context.Value() keys and not int or string. Open gist to see main.go but the TLDR is:
type key struct{}
ctx = context.WithValue(ctx, key{}, "my value") // Set value
myValue, ok := ctx.Value(key{}).(string) // Get value| internal class ConfigurableLoggerFiltering : IFilterLoggerSettings | |
| { | |
| private CancellationTokenSource cts; | |
| private IChangeToken token; | |
| private List<(string category, LogLevel level)> levels = new List<(string category, LogLevel level)>(); | |
| public ConfigurableLoggerFiltering() | |
| { | |
| this.Reload(); | |
| } |
| #!/bin/bash | |
| #### Restart Bluetooth | |
| if [ "$1" == "resetBT" ] ; then | |
| sudo rfkill block bluetooth && sleep 0.1 && sudo rfkill unblock bluetooth; | |
| exit; | |
| fi; | |
| #### Toggle listen/speak | |
| if [ "$1" == "" -o "$1" == "toggle" ] ; then |
| curl -L --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags/?page_size=1000" | \ | |
| jq '.results | .[] | .name' -r | \ | |
| sed 's/latest//' | \ | |
| sort --version-sort | \ | |
| tail -n 1 |
| sqlcmd -E -S "(localdb)\v11.0" -q "BACKUP DATABASE <DBNAME> TO DISK='<DRIVE>:\<FOLDER_PATH>\<BACKUP_FILE_NAME>.bak'" |
This fast tutorial will teach you how to install redis-clion AWS EC2 without having to install the whole Redis Server. Firstly, SSH into your EC2 instance and run the following command:
$ sudo yum install gcc
This may return an "already installed" message, but that's OK. After that, just run:
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make && sudo cp src/redis-cli /usr/local/bin/ && sudo chmod 755 /usr/local/bin/redis-cli
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
| // Reset the styles | |
| scintilla.StyleResetDefault(); | |
| scintilla.Styles[Style.Default].Font = "Courier New"; | |
| scintilla.Styles[Style.Default].Size = 10; | |
| scintilla.StyleClearAll(); | |
| // Set the SQL Lexer | |
| scintilla.Lexer = Lexer.Sql; | |
| // Show line numbers |
Principles of Adult Behavior