Skip to content

Instantly share code, notes, and snippets.

View mistical2008's full-sized avatar

Evgeniy Talko mistical2008

  • Russia
View GitHub Profile
@mixin clearfix {
&:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
min-height: 0;
}
@mistical2008
mistical2008 / install-webmin.sh
Created March 2, 2018 10:01 — forked from rrolla/install-webmin.sh
Fast install webmin in ubuntu / debian
#!/bin/bash
sudo add-apt-repository 'deb http://download.webmin.com/download/repository sarge contrib';
wget http://www.webmin.com/jcameron-key.asc;
sudo apt-key add jcameron-key.asc;
sudo apt-get update;
sudo apt-get install -y webmin;
# usage
# wget -O - https://gist.githubusercontent.com/djbeater/9ef5459aea7e958e2a724366bc7c5e36/raw/install-webmin.sh | bash
# OR

Hidden text that is still accessible to screen readers.

CSS:

.hidden {
  height: 1px;
  left: -10000px;
  overflow: hidden;
 position: absolute;
/**
* Fibonacci sequence generator.
* https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators#Advanced_generators
*
* @return {Number}
*/
function* fibonacci() {
let [a, b] = [0, 1];
let current;
while (true) {
@mistical2008
mistical2008 / times.js
Created March 21, 2018 06:46 — forked from remarkablemark/times.js
Invoke a callback `n` number of times using Array, fill, and map (JS).
'use strict';
/**
* Invoke a callback `n` number of times.
*
* @param {Number} n - The times.
* @param {Function} cb - The callback.
*/
function times(n, cb) {
Array(n).fill().map(function(_, i) {
@mistical2008
mistical2008 / measure.js
Created March 21, 2018 06:46 — forked from remarkablemark/measure.js
Measure width and height of an unrendered HTML element.
/**
* Measure an element.
*
* @param {HTMLElement} element - The element.
* @param {HTMLElement} [parentNode] - The parent element.
* @return {Object}
*/
function measure(element, parentNode) {
parentNode = parentNode || document.body;
element.style.display = 'block';
@mistical2008
mistical2008 / md5.js
Created March 21, 2018 06:46 — forked from remarkablemark/md5.js
Calculate the MD5 hash of a string using Node.js
'use strict';
/**
* Module dependencies.
*/
var crypto = require('crypto');
/**
* Calculates the MD5 hash of a string.
*

find

List all files and directories in directory:

find <directory>

List all files in directory:

find  -type f
@mistical2008
mistical2008 / README.md
Last active March 21, 2021 10:26 — forked from remarkablemark/README.md
How to connect to MongoDB with mongoose

How to connect to MongoDB with mongoose

See associated video.

Install

$ git clone https://gist.github.com/98a60b5ee632b94e6353af3b632246d3.git mongoose
$ cd mongoose
$ npm install
@mistical2008
mistical2008 / arch_virtualization.MD
Created April 14, 2018 19:37 — forked from heppu/arch_virtualization.MD
Arch virtualization and CoreOS

Arch virtualization

Check virtualization support

lscpu

Check KVM modules

zgrep CONFIG_KVM /proc/config.gz