Skip to content

Instantly share code, notes, and snippets.

View galakhov's full-sized avatar
🚂
Working from home

Dmitry galakhov

🚂
Working from home
View GitHub Profile
@galakhov
galakhov / nginx_with_cache.conf
Created May 9, 2021 09:08 — forked from Friz-zy/nginx_with_cache.conf
Nginx cache example config
# Based on articles:
# https://ruhighload.com/%D0%9A%D1%8D%D1%88%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5+%D1%81+nginx
# https://wiki.enchtex.info/practice/nginx/cache
# https://gist.github.com/yanmhlv/5612256
# https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html
# https://blog.runcloud.io/2017/10/28/nginx-caching-tutorial-wordpress.html
# https://www.digitalocean.com/community/tutorials/how-to-setup-fastcgi-caching-with-nginx-on-your-vps
# https://easyengine.io/wordpress-nginx/tutorials/single-site/fastcgi-cache-with-purging/
@galakhov
galakhov / vue.md
Created March 22, 2021 12:32 — forked from DawidMyslak/vue.md
Vue.js and Vuex - best practices for managing your state

Vue.js and Vuex - best practices for managing your state

Modyfing state object

Example

If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).

Example below explains implications for different implementations.

@galakhov
galakhov / Dockerfile-es
Created January 13, 2020 13:24 — forked from wshayes/Dockerfile-es
Elasticsearch and Kibana using docker-compose (v3)
FROM docker.elastic.co/elasticsearch/elasticsearch:5.5.1
RUN \
mv /usr/share/elasticsearch/plugins/x-pack /usr/share/elasticsearch/plugins/.removing-x-pack && \
mv /usr/share/elasticsearch/plugins/.removing-x-pack /usr/share/elasticsearch/plugins/x-pack && \
/usr/share/elasticsearch/bin/elasticsearch-plugin remove x-pack

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}
@galakhov
galakhov / index.html
Last active June 18, 2019 10:56
Cannot find exports / exports is not defined when working with vue-cli-plugin-electron-builder
<script>
var exports = { __esModule: true };
</script>
<!-- related topic: https://stackoverflow.com/questions/42497479/uncaught-referenceerror-exports-is-not-defined-in-filed-generated-by-typescript -->