Skip to content

Instantly share code, notes, and snippets.

View Uvacoder's full-sized avatar

uvacoder Uvacoder

View GitHub Profile
@Uvacoder
Uvacoder / mz_invisible_widget.js
Created November 1, 2022 19:37 — forked from mzeryck/mz_invisible_widget.js
A Scriptable script that creates "invisible" widget backgrounds based on your iOS wallpaper, and then either uses them as a Scriptable widget background or exports to your camera roll.
/*
MIT License
Copyright (c) 2022 Maxwell Zeryck
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTW
@Uvacoder
Uvacoder / meta-tags.md
Created October 29, 2022 23:29 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@Uvacoder
Uvacoder / News Widget.js
Created October 28, 2022 05:18 — forked from Saudumm/News Widget.js
iOS News Widget for Scriptable (RSS Feeds and WordPress websites
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: file-alt;
/********************************************
* *
* NEWS WIDGET (WORDPRESS AND RSS) *
* *
* v1.1.3 - made by @saudumm *
* https://twitter.com/saudumm *
* *
@Uvacoder
Uvacoder / crypto.js
Created October 28, 2022 04:51 — forked from siandreev/crypto.js
Crypto price widget
// Rubic Crypto Price Widget v1.2.0
// Copyright (c) 2021 Sergey Andreev <andreev@mywish.io>
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
@Uvacoder
Uvacoder / obsidian-web-clipper.js
Created October 25, 2022 23:15 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
function iterate(arr, findMe) {
if (arr[0]) {
if(arr[0] === findMe) {
return true;
}
}
if (arr[1]) {
if (arr[1] === findMe) {
return true;
}
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']
@Uvacoder
Uvacoder / dynamic-refs.jsx
Created October 18, 2022 16:11 — forked from whoisryosuke/dynamic-refs.jsx
ReactJS - Dynamically create Refs for children using useRef hook and createRef - @see: https://stackoverflow.com/questions/55995760/how-to-add-refs-dynamically-with-react-hooks
const {
useState,
useRef,
createRef,
useEffect
} = React;
const data = [
{
text: "test1"
@Uvacoder
Uvacoder / broken-array.js
Created October 18, 2022 16:10 — forked from whoisryosuke/broken-array.js
JS - Broken array mapping -- need to use `[...new Array(16)]`
new Array(16)
.map((_, index) => {
console.log('first', index)
return index
})
.reverse()
.map((index) => console.log(index))
@Uvacoder
Uvacoder / fetch-post-request.js
Created October 18, 2022 16:10 — forked from whoisryosuke/fetch-post-request.js
JS - Fetch POST request as async function
(async () => {
const rawResponse = await fetch('https://httpbin.org/post', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({a: 1, b: 'Textual content'})
});
const content = await rawResponse.json();