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 / 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>
<!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 / 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;
@englishextra
englishextra / swipe.js
Created March 2, 2017 12:00 — forked from SleepWalker/swipe.js
A simple swipe detection on vanilla js
var touchstartX = 0;
var touchstartY = 0;
var touchendX = 0;
var touchendY = 0;
var gesuredZone = document.getElementById('gesuredZone');
gesuredZone.addEventListener('touchstart', function(event) {
touchstartX = event.screenX;
touchstartY = event.screenY;
@englishextra
englishextra / feature-detect flexbox.js
Created February 28, 2017 16:55 — forked from davidhund/feature-detect flexbox.js
The simplest feature-detect for flexbox?
/*
* Trying to feature-detect (very naive)
* CSS Flexbox support.
* - Only most modern syntax
*
* Is this nonsense?
*/
(function NaiveFlexBoxSupport(d){
var f = "flex", e = d.createElement('b');
@englishextra
englishextra / manifest.json
Created February 27, 2017 13:35
englishextra.github.io-manifest.json
{
"name": "englishextra",
"short_name": "englishextra",
"manifest_version": 2,
"icons": [{
"src": "/favicon-16x16.png",
"sizes": "16x16",
"type": "image/png"
},
{
@englishextra
englishextra / AJAXLoadTriggerJs.js
Last active February 3, 2017 13:13
Load and execute JS via AJAX
/*!
* Load and execute JS via AJAX
* gist.github.com/englishextra/8dc9fe7b6ff8bdf5f9b483bf772b9e1c
* IE 5.5+, Firefox, Opera, Chrome, Safari XHR object
* gist.github.com/Xeoncross/7663273
* modified callback(x.responseText,x); to callback(eval(x.responseText),x);
* stackoverflow.com/questions/3728798/running-javascript-downloaded-with-xmlhttprequest
* @param {String} u path string
* @param {Object} [f] callback function
* @param {Object} [e] on error callback function