This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.8.7 | |
ports: | |
- 9200:9200 | |
- 9300:9300 | |
environment: | |
- discovery.type=single-node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express from 'express'; | |
import { createEvent } from '../controllers/Events/createEvent'; | |
import { getEvents } from '../controllers/Events/getEvents'; | |
import { updateEvent } from '../controllers/Events/updateEvent'; | |
import { deleteEvent } from '../controllers/Events/deleteEvent'; | |
const router = express.Router(); | |
router.route('/events') | |
.get(async (req, res) => { | |
// all action in controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.10 | |
RUN apt-get update && \ | |
apt-get install build-essential cmake -y && \ | |
apt-get install libopenblas-dev liblapack-dev -y && \ | |
apt-get install libx11-dev libgtk-3-dev -y && \ | |
apt-get install python python-dev python-pip -y && \ | |
apt-get install python3 python3-dev python3-pip -y | |
# build ~3-4 hours(!) on i7 8700k + 960pro (nvme ssd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vk.com###stories_feed_wrap | |
stackoverflow.com###js-gdpr-consent-banner | |
99percentinvisible.org###cookie-policy | |
serverfault.com###js-gdpr-consent-banner | |
superuser.com###js-gdpr-consent-banner | |
vk.com##.feed_friends_recomm | |
vk.com###feed_filters | |
ntv.ru###newcontent | |
unix.stackexchange.com###js-gdpr-consent-banner | |
askubuntu.com###js-gdpr-consent-banner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EditorConfig is awesome: http://EditorConfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
indent_size = 2 | |
end_of_line = lf | |
indent_style = space | |
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# roles when | |
roles: | |
- { role: main, when: inventory_file|basename == 'inventory' } | |
# WSL connection bug | |
# https://stackoverflow.com/questions/62363901/ansible-msg-failed-to-create-temporary-directory-in-some-cases-fatal | |
mv /usr/bin/sleep /usr/bin/sleep.dist | |
ln -s /bin/true /usr/bin/sleep | |
# Run locally |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Как мигрировать docker volume на примере elasticsearch | |
# Backup | |
Запускаем елку, и вкидываем в нее данные, хоть через апи, хоть elasticdump | |
После этого в вольюмах будет много данных (тестировалось на 2 елке) | |
Смотрим оф руководство https://docs.docker.com/storage/volumes/#backup-a-container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file, err := ioutil.ReadFile("/path/to/index.txt") | |
if err != nil { | |
fmt.Print(err) | |
} | |
str := string(file) | |
fmt.Println(str) |
NewerOlder