diff --git a/.editorconfig b/.editorconfig index ef432d9..b8d691c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -21,7 +21,7 @@ indent_style = space indent_size = 4 # Crystal -[{*.cr,shard.yml}] +[{*.cr,shards.yml}] indent_style = space indent_size = 2 @@ -80,10 +80,10 @@ indent_size = 4 indent_style = tab indent_size = 4 -[~/Gambas/*] +[snipplets/code/Gambas/*] indent_size = 2 -[~/Solar2D/**] +[snipplets/projects/Solar2D**] indent_style = unset indent_size = unset end_of_line = unset diff --git a/snipplets/code/Bash/unix-socket-server.sh b/snipplets/code/Bash/unix-socket-server.sh index e60ad54..4cc7e66 100755 --- a/snipplets/code/Bash/unix-socket-server.sh +++ b/snipplets/code/Bash/unix-socket-server.sh @@ -1,17 +1,17 @@ #!/bin/bash # TCP -#coproc nc -l localhost 3000 +# coproc nc -l localhost 3000 # UnixSocket coproc nc -l -U ./app.sock while read -r cmd; do - case $cmd in - d) date ;; - q) break ;; - *) echo 'Try again?' - esac + case $cmd in + d) date ;; + q) break ;; + *) echo 'Try again?' + esac done <&"${COPROC[0]}" >&"${COPROC[1]}" kill "$COPROC_PID" diff --git a/snipplets/code/C/format-code b/snipplets/code/C/format-code index aac7d47..381f629 100755 --- a/snipplets/code/C/format-code +++ b/snipplets/code/C/format-code @@ -6,5 +6,5 @@ files=( for file in "${files[@]}" do - clang-format -i --style=LLVM --sort-includes=false $file + clang-format -i --style=LLVM --sort-includes=false $file done diff --git a/snipplets/code/C/thread.c b/snipplets/code/C/thread.c index 83521fb..a1d03f8 100644 --- a/snipplets/code/C/thread.c +++ b/snipplets/code/C/thread.c @@ -8,24 +8,24 @@ int g = 0; void *my_thread(void *vargp) { - int *id = (int *)vargp; + int *id = (int *)vargp; - static int s = 0; + static int s = 0; - ++s; - ++g; + ++s; + ++g; - printf("Thread ID: %d, Static: %d, Global: %d\n", *id, ++s, ++g); + printf("Thread ID: %d, Static: %d, Global: %d\n", *id, ++s, ++g); } int main() { - pthread_t tid; + pthread_t tid; - int i; - for (i = 0; i < 3; i++) + int i; + for (i = 0; i < 3; i++) pthread_create(&tid, NULL, my_thread, (void *)&tid); - pthread_exit(NULL); + pthread_exit(NULL); - return 0; + return 0; }