Skip to content

Instantly share code, notes, and snippets.

View ur92's full-sized avatar

Evgeni Dikerman ur92

  • Epsilon Delta Computers
View GitHub Profile
@ryanoglesby08
ryanoglesby08 / server.js
Last active April 4, 2024 13:25
A node.js SPA server that serves static files and an index.html file for all other routes.
/*
Incredibly simple Node.js and Express application server for serving static assets.
DON'T USE THIS IN PRODUCTION!
It is meant for learning purposes only. This server is not optimized for performance,
and is missing key features such as error pages, compression, and caching.
For production, I recommend using an application framework that supports server-side rendering,
such as Next.js. https://nextjs.org

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);
@isellsoap
isellsoap / gist:8299726
Last active February 13, 2023 23:11
A Sass function for converting px to em values. Works with mixed px and em values and with nested em structures.
$base-font-size: 16px;
/**
* Strips the unit from a given number-unit-combination and returns the number.
* @link: http://stackoverflow.com/a/12335841/1779999
* @usage: parse-int(10px) => 10
*/
@function parse-int($number) {
@return $number / ($number * 0 + 1);