Error: Node Sass does not yet support your current environment: OS X Unsupported architecture (arm64)
npm rebuild node-sass
16 февраля 2021, 17:00
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
function replaceAll(string, search, replace) { return string.split(search).join(replace); }
WITH T(StyleID, ID) AS (SELECT 1,1 UNION ALL SELECT 1,1 UNION ALL SELECT 1,1 UNION ALL SELECT 1,2) SELECT *, RANK() OVER(PARTITION BY StyleID ORDER BY ID) AS 'RANK', ROW_NUMBER() OVER(PARTITION BY StyleID ORDER BY ID) AS 'ROW_NUMBER', DENSE_RANK() OVER(PARTITION BY StyleID ORDER BY ID) AS 'DENSE_RANK' FROM T Returns StyleID ID RANK ROW_NUMBER DENSE_RANK ----------- -------- --------- --------------- ---------- 1 1 1 1 1 1 1 1 2 1 1 1 1 3 1 1 2 4 4 2