Skip to content

Instantly share code, notes, and snippets.

View avioli's full-sized avatar

Evo Stamatov avioli

View GitHub Profile
@shqld
shqld / css-size-comparison.csv
Last active October 3, 2022 21:13 — forked from primaryobjects/css-comparison.csv
A comparison of CSS library sizes.
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 8.
Caution,Name,Version,Size (raw),Size (minified),Size (gzipped),"Site","URL",Remarks
,Milligram,v1.4.1,11 kb,9.0 kb,2.3 kb,"https://milligram.io/","https://cdnjs.cloudflare.com/ajax/libs/milligram/1.4.1/milligram.min.css",
,Skelton,v2.0.4,11 kb,5.8 kb,1.6 kb,"http://getskeleton.com/","https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css",
,Material Design Lite,v1.3.0,146 kb,62 kb,12 kb,"https://getmdl.io/","https://code.getmdl.io/1.3.0/material.min.js",
,Foundation,v6.6.3,168 kb,133 kb,17 kb,"https://get.foundation/","https://cdn.jsdelivr.net/npm/foundation-sites@6.6.3/dist/css/foundation.min.css",
,Materialize,v1.0.0,179 kb,141 kb,21 kb,"https://materializecss.com/","https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css",
,Bootstrap,v4.6.0,199 kb,161 kb,24 kb,"https://getbootstrap.com/docs/4.6/","https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css",
,Bootstrap,v5.1.2,206 kb,164 kb,24 kb,"https://getbootstrap.com/","https://cdn.jsdelivr.net/npm/b
@sindresorhus
sindresorhus / esm-package.md
Last active June 9, 2024 17:19
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@fkraeutli
fkraeutli / downloadGitLfsFiles.md
Last active May 6, 2024 10:49
How to download GIT LFS files

How to retrieve GIT LFS files from GitHub

Retrieving non-LFS files

Through the GitHub API it is possible to retrieve individual files from a Git repository via, e.g. curl. To do so, first retrieve the content information for the relevant file (or folder):

curl https://api.github.com/repos/{organisation}/{repository}/contents/{file or folder path}

For private repositories, authenticate using your username and a personal access token

@prologic
prologic / LearnGoIn5mins.md
Last active May 9, 2024 20:15
Learn Go in ~5mins
const If = expression => {
let call = true, value;
return {
then: callback => Promise.resolve(value).then(callback),
Then(callback) {
if (call && expression) {
call = false;
value = callback(expression);
}
return this;
@kangabru
kangabru / magnifying_glass.dart
Last active August 17, 2020 08:45
Allows you to display a 'magnifying glass' widget which helps users see what's under their finger while they are drawing
import 'dart:math';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
/// The radius of the mag glass.
const double _RADIUS = 60.0;
/// The distance the mag glass will be offset from the touch point.
const double _OFFSET = _RADIUS * 1.5;
@kangabru
kangabru / screenshot.dart
Last active November 9, 2020 13:27
Allows you extract an image of specific widgets within your app. Includes the ability to ignore certain widgets and to crop the final image.
import 'dart:typed_data';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
// Note: [ui.Image] represents the lower level image data while [Image] represents a renderable image.
/// Provides the ability to take screenshots of specific widgets.
mixin Screenshot<T extends StatefulWidget> on State<T> {
function getBrowserLocales(options = {}) {
const defaultOptions = {
languageCodeOnly: false,
};
const opt = {
...defaultOptions,
...options,
};
@RobertAKARobin
RobertAKARobin / python.md
Last active May 25, 2024 05:30
Python Is Not A Great Programming Language
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active June 2, 2024 11:24
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}