Skip to content

Instantly share code, notes, and snippets.

View titulus's full-sized avatar

Андрей Кунцевич titulus

View GitHub Profile
@titulus
titulus / debian.sh
Last active January 12, 2024 21:11
debian
#nodejs
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && sudo apt-get install -y nodejs
#mongodb
sudo apt-get install dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list \
&& sudo apt-get update && sudo apt-get install -y mongodb-org \
&& sudo service mongod start && sudo systemctl enable mongod.service
@titulus
titulus / cookiesParser.js
Last active January 20, 2024 02:00
parse cookies.txt into array of object used by puppeteer
const fs = require('fs');
const file = fs.readFileSync('./cookies.txt', 'utf8');
const cookies = file
.split('\n')
.map(line => line2object(''+line))
.filter(notNull => notNull);
module.exports = cookies;
@titulus
titulus / momentUTC.js
Created February 22, 2018 09:43
moment ignore local UTC offset
moment().utcOffset(0,true)