Skip to content

Instantly share code, notes, and snippets.

View error404as's full-sized avatar

Vitali K error404as

View GitHub Profile
@error404as
error404as / gist:c633f73bb99f31863369
Last active May 15, 2016 20:36
Save JSON to Google Drive. Check if file exists (by filename). Update existing file. Get JSON from Google Drive file having file ID.
<!--
Example shows functionality of:
- saving JSON (appState) to Google Drive
- updating Google Drive file if file with such filename exists
- retrieving saved data from file with ID saved in localStogare (picker may be used instead: https://developers.google.com/picker/docs/ )
Used google tutorial examples:
https://developers.google.com/drive/web/quickstart/quickstart-js
https://developers.google.com/drive/v2/reference/files/get
https://developers.google.com/drive/v2/reference/files/update
@error404as
error404as / colors visuzl
Last active September 5, 2016 13:57
colors visuzl
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<a href='https://output.jsbin.com/dunira'>JS Bin</a>
<textarea id="src" cols="30" rows="10">.err input, .err select, input.err, select.err {border-color: rgba(#d40f0f, 0.5); color: #f0f;}
@error404as
error404as / a11y-headers
Created March 30, 2018 12:55
a11y-headers
javascript: (function () {
var css = `#e404h_overlay {position:fixed; bottom:0; width:80%; max-height:200px; overflow:auto; padding:15px;}.e404h_i:hover {background: rgba(255,0,0,.2); cursor:pointer;}.e404h_i.e404h_hidden {opacity:.2; cursor:not-allowed;}.e404h_i.e404h_hidden::after {content:' [hidden]';}.e404h_h1 {font-size: 30px; line-height: 1.1;}.e404h_h2 {font-size: 25px; line-height: 1.1;}.e404h_h3 {font-size: 20px; line-height: 1.2;}.e404h_h4 {font-size: 17px; line-height: 1.3;}.e404h_h5 {font-size: 14px; line-height: 1.3;}.e404h_h6 {font-size: 11px; line-height: 1.3;}.e404h_hlight {box-shadow: 0 0 3px 1px #f00;}`;
var html = '';
var headings = document.querySelectorAll('h1,h2,h3,h4,h5,h6');
var heads = [];
for (var i = 0; i < headings.length; i++) {
heads.push({
tag: headings[i].tagName.toLowerCase(),
text: headings[i].textContent.trim(),
elem: headings[i]
// https://github.com/watching
[...document.querySelectorAll('.repo-list > li .select-menu-modal .select-menu-list button:first-child')].forEach(el => el.click());
setTimeout(()=>{ window.location.reload(); }, 1000);