Skip to content

Instantly share code, notes, and snippets.

View ArtemPitov's full-sized avatar

ArtemPitov ArtemPitov

View GitHub Profile
@ArtemPitov
ArtemPitov / nginx.conf
Created February 10, 2019 01:13 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@ArtemPitov
ArtemPitov / sm-annotated.html
Created February 14, 2018 20:43 — forked from hdragomir/sm-annotated.html
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
var gulp = require('gulp'),
stylus = require('gulp-stylus'),
nib = require('nib'),
autoprefixer = require('gulp-autoprefixer'),
csscomb = require('gulp-csscomb');
gulp.task('styles', function() {
gulp.src('./stylus/*.styl')
.pipe(stylus({ use: [nib()] }))