Skip to content

Instantly share code, notes, and snippets.

@fobiasmog
fobiasmog / stylus.md
Created March 23, 2021 20:09 — forked from neretin-trike/stylus.md
Туториал по CSS препроцессору Stylus
@fobiasmog
fobiasmog / ruby.md
Last active January 10, 2025 11:06
Ruby & Rails hacks

Проверка, что все элементы в массиве идут по порядку от 1 до Х

arr.select.with_index { |e, i| e == i+1 }.size == arr.size

extend self

Полезен, когда нужно сделать метод модуля

module X
  extend self
@fobiasmog
fobiasmog / iata.json
Last active February 6, 2025 06:41
Коды стран IATA в формате ISO 3166-1 (двухбуквенная)
[
{
"text":"Австралия",
"value":"AU"
},
{
"text":"Австрия",
"value":"AT"
},
{
@fobiasmog
fobiasmog / nginx.conf
Created June 30, 2019 14:44 — forked from nrollr/nginx.conf
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration