Skip to content

Instantly share code, notes, and snippets.

View englishextra's full-sized avatar
💜
the beat goes on

englishextra englishextra

💜
the beat goes on
View GitHub Profile
@englishextra
englishextra / css-media-queries-cheat-sheet.css
Created September 12, 2017 09:19 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@englishextra
englishextra / loadExt.js
Created July 4, 2017 22:25 — forked from Aymkdn/loadExt.js
To load JS and CSS files with vanilla JavaScript
// long version
function loadExt(files, after) {
var _this=this;
_this.files = files;
_this.js = [];
_this.head = document.getElementsByTagName("head")[0];
_this.after = after || function(){};
_this.loadStyle = function(file) {
var link = document.createElement("link");
link.rel = "stylesheet";
@englishextra
englishextra / .eslintrc
Created June 13, 2017 21:30 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@englishextra
englishextra / function-bind.js
Last active May 1, 2017 22:11 — forked from Daniel-Hug/function-bind.js
Polyfill for Function.prototype.bind
/*!
* Polyfill for Function.prototype.bind
* @see {@link https://gist.github.com/Daniel-Hug/5682738}
* @see {@link https://gist.github.com/englishextra/db0f22a60e59de86c19f174938c09529}
*/
if (!Function.prototype.bind) {
Function.prototype.bind = (function () {}).bind || function (b) {
if (typeof this !== "function") {
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
}
<!DOCTYPE html>
<!-- Edit this and the preview will update automatically. -->
<svg xmlns='http://www.w3.org/2000/svg' width='5' height='5'>
<rect width='5' height='5' fill='transparent'/>
<path d="M0 5L5 0ZM6 4L4 6ZM-1 1L1 -1Z" stroke="#4B4B4B" stroke-width="1"></path>
</svg>
@englishextra
englishextra / index.html
Last active April 26, 2017 20:53
modified navbar.js - Minimal navigation script
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="HandheldFriendly" content="True" />
<meta name="MobileOptimized" content="320" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noindex,nofollow" />
<meta name="description" content="Страница не найдена" /><title>Страница не найдена</title>
@englishextra
englishextra / imagePromise.js
Created March 27, 2017 14:47
return image is loaded promise
/*!
* return image is loaded promise
* @param {String|Object} s image path string or HTML DOM Image Object
* imagePromise(path_to_image).then(function (r) {
* my_image_object.src = r;
* }).catch (function (err) {
* console.error("function manageImgLightboxLinks: image failed to load", err);
* });
* source: gist.github.com/englishextra/3e95d301d1d47fe6e26e3be198f0675e
* passes jshint
@englishextra
englishextra / testing.html
Created March 23, 2017 19:27 — forked from rowanmanning/testing.html
HTML template for testing CSS
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>CSS Testing</title>
</head>
<body id="top">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@englishextra
englishextra / qr.js
Last active March 16, 2017 21:40
modified qr.js -- QR code generator in Javascript (revision 2011-01-19)
/*!
* modified qr.js -- QR code generator in Javascript (revision 2011-01-19)
* Written by Kang Seonghoon <public+qrjs@mearie.org>.
* v0.0.20110119
* This source code is in the public domain; if your jurisdiction does not
* recognize the public domain the terms of Creative Commons CC0 license
* apply. In the other words, you can always do what you want.
* added options properties: fillcolor and textcolor
* svg now works in Edge 13 and IE 11
* gist.github.com/englishextra/b46969e3382ef737c611bb59d837220b
@englishextra
englishextra / font_variables.scss
Created March 13, 2017 15:35 — forked from jacrook/font_variables.scss
Sass Css Font Stack Variables
//////////////////////////////////////////////////////////////
// Font Variables (http://cssfontstack.com/)
//////////////////////////////////////////////////////////////
//
// Serif font-stacks
//
$baskerville-font-stack: "Big Caslon", "Book Antiqua", "Palatino Linotype", Georgia, serif !default;