: --(max 50 chars)----->|
--(max 72 chars)------------------------------->|
--- COMMIT END --- Conventional commits (https://www.conventionalcommits.org/en/v1.0.0/#summary) feat (new feature) fix (bug fix) refactor (refactoring production code)
: --(max 50 chars)----->|
--(max 72 chars)------------------------------->|
--- COMMIT END --- Conventional commits (https://www.conventionalcommits.org/en/v1.0.0/#summary) feat (new feature) fix (bug fix) refactor (refactoring production code)
#!/usr/bin/env bash | |
######################################################### | |
# Dock Related Settings | |
######################################################### | |
# Переместить Dock справа | |
defaults write com.apple.dock orientation -string "right" | |
# Размер иконок в Dock (30px) |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
import "sync" | |
type Cond struct { | |
lock sync.RWMutex | |
changed chan struct{} | |
} | |
func (c *Cond) Listen() <-chan struct{} { | |
c.lock.RLock() | |
defer c.lock.RUnlock() |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"net/http" | |
) | |
func handleResponse[T any](resp *http.Response, err error, t *T) error { | |
if err != nil { |
package cond | |
type Cond struct { | |
lock sync.RWMutex | |
changed chan struct{} | |
} | |
func newCond() *Cond { | |
return &Cond{changed: make(chan struct{})} | |
} |
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
find . -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \; | |
# or | |
find . -type d -not -path './.git*' -maxdepth 1 \( ! -name . \) |
\x auto | |
\timing on | |
SET work_mem='512MB'; | |
SET maintenance_work_mem='1GB'; | |
-- Nicer PSQL prompt | |
-- Prompt1 / Prompt2 | |
-- %M : server |