Skip to content

Instantly share code, notes, and snippets.

@loilo
loilo / readme.md
Last active April 9, 2024 20:01
Sass Dark/Light Theme Mixin

Sass Dark/Light Theme Mixin

This is a Sass mixin to handle a 3-way dark mode. It relies on a data-theme attribute on your <html> element with a value of light or dark. If data-theme is absent (i.e. it's neither light nor dark), the system's preferred mode is used.

body {
  // matches data-theme="light" or data-theme="auto" with system instructing light mode
  @include light {
    background: white;
 color: black;
@MrDrMcCoy
MrDrMcCoy / Caddyfile
Created August 23, 2019 21:55
Run Nextcloud, Bitwarden_rs, and poste.io with Caddy proxy in Docker
yourhost.com {
redir / https://cloud.yourhost.com 301
}
cloud.yourhost.com {
tls admin@yourhost.com
header / Strict-Transport-Security "max-age=31536000;"
root /var/www/html
fastcgi / nextcloud:9000 php {
connect_timeout 1h
@spotzero
spotzero / Makefile
Last active April 2, 2024 14:54
Very Simple Podman and Buildah Makefile for Drupal local dev and beyond with Solr support
# Quick and lean Drupal local dev with Podman and an unpriviledged user.
#
# To use, run the following:
# 1. projectname="myproject"
# 2. composer create-project drupal-composer/drupal-project:8.x-dev $projectname --no-interaction
# 3. cd $projectname
# 4. curl -o Makefile https://gist.githubusercontent.com/spotzero/18fd821cb9081c666a629e940f166f52/raw
# 5. make start
# 6. make install
#
@nesterione
nesterione / ghost-telegram-template
Created July 9, 2018 10:22
Telegram instantview template for Ghost blog
$main: //*[@id="site-main"]/div/article
title: $main/header/h1
body: $main/section[1]
author: //*[@id="site-main"]/div/article/footer/section/section/h4/a
author_url: "https://vk.com/nesterione"
@akella
akella / setup.md
Last active February 21, 2023 22:59
Мой сетап

То что я использую в работе и стримах

Софт для разработки

@akalongman
akalongman / gulpfile.js
Created November 4, 2015 11:42
Gulp task for uploading files to ftp/sftp server based on Sublime Text sftp-config.json configuration file
const gutil = require('gulp-util');
const ftp = require( 'vinyl-ftp' );
const sftp = require('gulp-sftp');
// task for deploying files on the server
gulp.task('deploy', function() {
const config = require('./sftp-config.json');
const globs = [
'folder/file',

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);