HomeBrew fatal error: 'pcre2.h' file not found
ln -s /opt/homebrew/Cellar/pcre2/10.36/include/pcre2.h /opt/homebrew/Cellar/php/8.0.2/include/php/ext/pcre
17 февраля 2021, 00:04
ln -s /opt/homebrew/Cellar/pcre2/10.36/include/pcre2.h /opt/homebrew/Cellar/php/8.0.2/include/php/ext/pcre
sudo adduser \ --system \ --shell /bin/bash \ --gecos 'description' \ --group \ --disabled-password \ --home /home/us \ us
npm rebuild node-sass
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
sudo apt-get remove -y docker docker-engine docker.io containerd runc sudo apt-get update sudo apt-get install -y \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update sudo apt-get install -y docker-ce docker-ce-cli containerd.io
brew tap homebrew-ffmpeg/ffmpeg brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-fdk-aac
"open_files_in_new_window": false
defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder
export NODE_OPTIONS=--max_old_space_size=4096
<?php function slugify($string) { $translit = "Any-Latin; NFD; [:Nonspacing Mark:] Remove; NFC; [:Punctuation:] Remove; Lower();"; $string = transliterator_transliterate($translit, $string); $string = preg_replace('/[-\s]+/', '-', $string); return trim($string, '-'); } echo slugify("Я люблю PHP!");
SELECT d::date FROM generate_series( timestamp without time zone '2021-01-01', timestamp without time zone '2021-02-01', '1 day' ) AS gs(d);
knex( knex('A').where('A.id',1).as('t1') ).leftJoin( knex('B').where('B.id', 2).as('t2'), 't1.c', 't2.d' )
SELECT setval('your_table_id_seq', COALESCE((SELECT MAX(id)+1 FROM your_table), 1), false) or SELECT setval(pg_get_serial_sequence('tbl', 'id'), COALESCE(max(id) + 1, 1), FALSE) FROM tbl;
function endOfWeek(date) { const lastday = date.getDate() - (date.getDay() - 1) + 6; return new Date(date.setDate(lastday)); } const dt = new Date(); console.log(endOfWeek(dt).toString());
certbot run -a manual -i nginx -d example.com
select enum_range(null::my_type)
service --status-all
const sleep = (ms) => new Promise( (r) => setTimeout(r, ms));
CREATE TABLE table1 ( "id" Integer NOT NULL, "a" Text NOT NULL, "b" Text NOT NULL ); insert into table1 values (1, 'a', 'b'), (2, 'a', 'b')
update table1 as t set a = data.a, b = data.b from (values (1, 'a1', 'b1'), (2, 'a2', 'b2') ) as data(id, a, b) where t.id = data.id
git commit --amend