Skip to content

Instantly share code, notes, and snippets.

// Settings Sync
// Полный каталог фильмов
router.get('/movies', function (_req, res) {
const response = {};
const titles = [];
//Тут мы генерируем, если нет файла
if (!fs.existsSync('./dist/data/movies.json')) {
library.getMovies();
}
const movies = require('./dist/data/movies.json'); //тут ошибка
movies.titles.forEach(function (movie) {
@ivanxpru
ivanxpru / h264ify-nativefier.js
Created October 1, 2019 07:31
h264ify for inject to nativefier
// ==UserScript==
// @name Youtube H.264
// @namespace http://www.youtube.com
// @version 1.1.2
// @description use H.264 on youtube. based on https://github.com/erkserkserks/h264ify.
// @match http://youtube.com/*
// @match https://youtube.com/*
// @match http://www.youtube.com/*
// @match https://www.youtube.com/*
// @grant none
@ivanxpru
ivanxpru / media-queries-boilerplate.css
Created July 8, 2014 17:31
media-queries-boilerplate.css
/** media-queries-boilerplate.css
/** smartphone **/
/** smartphone (landscape)**/
@media only screen
and (min-width : 321px) {}
/** smartphone (portrait)**/
@media only screen
and (max-width : 320px) {}
@ivanxpru
ivanxpru / css3-mediaqueries-js
Created July 1, 2014 09:59
css3-mediaqueries.js - CSS Helper and CSS3 Media Queries Enabler
<!--[if lt IE 9]>
<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->
@ivanxpru
ivanxpru / viewport.css
Created July 1, 2014 08:03
Viewport Sized Typography
h1 {
font-size: 5.9vw;
}
h2 {
font-size: 3.0vh;
}
p {
font-size: 2vmin;
}
@ivanxpru
ivanxpru / css_resources.md
Created July 1, 2014 07:29 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@ivanxpru
ivanxpru / @media.css
Created July 1, 2014 07:27
Media Queries for Standard Devices
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {