Skip to content

Instantly share code, notes, and snippets.

@git2358
git2358 / index.html
Created June 28, 2019 09:34 — forked from valnub/index.html
iPhone X notch optimization HTML, CSS
<!doctype>
<html>
<head>
<title>Notch test</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<style>
* {margin: 0;padding: 0;}
@git2358
git2358 / md-link.js
Created September 25, 2019 23:05 — forked from Rarst/md-link.js
Bookmarklet for markdown link of current page
@git2358
git2358 / List-of-search-engine.json
Created November 7, 2019 18:07 — forked from NaveenDA/List-of-search-engine.json
List of Search Engine in Json Format
[
{
"name": "Google",
"url": "http:\/\/www.google.com"
},
{
"name": "Bing",
"url": "http:\/\/www.bing.com"
},
{
@git2358
git2358 / xmlToJson.js
Created November 18, 2019 13:21 — forked from chinchang/xmlToJson.js
Function to convert XML to JSON
/**
* Changes XML to JSON
* Modified version from here: http://davidwalsh.name/convert-xml-json
* @param {string} xml XML DOM tree
*/
function xmlToJson(xml) {
// Create the return object
var obj = {};
if (xml.nodeType == 1) {
@git2358
git2358 / xmlToJson.js
Created November 18, 2019 13:23 — forked from demircancelebi/xmlToJson.js
Function to convert XML to JSON
// Changes XML to JSON
// Modified version from here: http://davidwalsh.name/convert-xml-json
xmlToJson(xml) {
// Create the return object
let obj = {};
if (xml.nodeType === 1) { // element
// do attributes
if (xml.attributes.length > 0) {
obj['@attributes'] = {};
@git2358
git2358 / qrcode-bookmarklet.js
Created November 28, 2019 01:06 — forked from ThomasR/qrcode-bookmarklet.js
A bookmarklet that generates a QR Code of the current URL. Click to return to page content.
javascript: void (function (main) {
var script = document.createElement('script');
script.onload = main;
script.src = 'https://davidshimjs.github.io/qrcodejs/qrcode.min.js';
document.head.appendChild(script).parentNode.removeChild(script);
})(function () {
var size = 400;
var qr = new QRCode(document.body, {
text: location.href,
width: size,
@git2358
git2358 / Search my gists.md
Created December 10, 2019 22:09 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files. language:html

Seven different types of CSS attribute selectors
// This attribute exists on the element
[value]
// This attribute has a specific value of cool
[value='cool']
// This attribute value contains the word cool somewhere in it
[value*='cool']
@git2358
git2358 / plink-plonk.js
Created February 17, 2020 22:22 — forked from tomhicks/plink-plonk.js
Listen to your web pages
@git2358
git2358 / sweep-swoop.js
Created April 17, 2020 14:08 — forked from tomhicks/sweep-swoop.js
Listen to your web pages
const audioCtx = new window.AudioContext();
const oscillator = audioCtx.createOscillator();
oscillator.connect(audioCtx.destination);
oscillator.type = "sine";
let numItems = 0
oscillator.frequency.setValueAtTime(
1,
audioCtx.currentTime