Skip to content

Instantly share code, notes, and snippets.

View RoneoOrg's full-sized avatar

Roneo.org RoneoOrg

View GitHub Profile
@jeb5
jeb5 / Youtube Subs to OPML.js
Last active November 9, 2024 02:13
Youtube Subscriptions to RSS/OPML
const channels = [...document.querySelectorAll("#main-link.channel-link")].map(e => {
const [, a, b] = e.href.match("/((?:user)|(?:channel))/(.*)$");
const feed = "https://www.youtube.com/feeds/videos.xml?" + (a === "user" ? "user=" : "channel_id=") + b;
const channelName = e.querySelector("yt-formatted-string.ytd-channel-name").innerText;
return [feed, channelName];
});
if (channels.length == 0) {
alert("Couldn't find any subscriptions");
} else {
console.log(channels.map(([feed, _]) => feed).join("\n"));
@m-radzikowski
m-radzikowski / script-template.sh
Last active November 15, 2024 11:25
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@felixboet
felixboet / custom-netlify-cms-widgets.md
Last active September 24, 2021 07:41
Custom Netlify CMS widgets

A list of custom Netlify CMS widgets

Netlify CMS comes with several built-in widgets to define the data type and interface for entry fields. This is an overview of additional widgets created by the community. Please feel free to add your custom widget to the list.

widget description demo
netlify-cms-widget-uuid-v4 UUID widget to safely link between items
@ncwidgets/id Generate a unique ID for new entries in a folder collection demo
@ncwidgets/reorder custom ordering of a referenced collection demo
@katopz
katopz / photopea-hide-ads.md
Last active April 16, 2024 04:48
How to hide photopea ads

Open console and run this for 0px width ads. (ads still working, adjust width size to suite your need)

document.querySelector("body > div.flexrow.app > div:nth-child(2)").setAttribute('style','max-width:0px')

document.querySelector("body > div.flexrow.app > div").setAttribute('style','width:100%')
document.querySelector("body > div.flexrow.app > div > div.flexrow > div.panelblock.mainblock").setAttribute('style','width:100%')
const style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '.fixme { min-width:fit-content;overflow:unset; }';
document.querySelector("body > div.flexrow.app > div:nth-child(1) > div.flexrow").appendChild(style)
@damien1
damien1 / typography.html
Last active January 24, 2024 22:01
Hugo Shortcode add Google Fonts and style to selected text. Visit my site for details https://bit.ly/31PSv6d example: {{< typography font="monoton" size="100px" style="italic" >}}You are awesome. You're even better! {{< /typography >}}
<!-- for usage details visit https://bit.ly/31PSv6d -->
{{ $font := .Get "font" }}
{{ $size := .Get "size" }}
{{ $style := .Get "style" | default "normal" }}
{{ $weight := .Get "weight" | default "normal" }}
<link href="https://fonts.googleapis.com/css?family={{ $font }}" rel="stylesheet" type="text/css">
<div style="font-family:'{{ $font }}'; font-size:{{ $size }}; font-style:{{ $style}}; font-weight:{{ $weight }}">
{{- .Inner -}}
</div>
@JonathanDn
JonathanDn / medium_clap.html
Last active June 9, 2023 07:34
(moved to a repo https://github.com/JonathanDn/mediumclap ) Medium Clap Reproduction - My take on it by looking, researching and trial & error. Demo available --> https://jsfiddle.net/urft14zr/425/
<div class="canvas">
<div id="totalCounter" class="total-counter"></div>
<div id="clap" class="clap-container">
<i class="clap-icon fa fa-hand-paper-o"></i>
</div>
<div id="clicker" class="click-counter">
<span class="counter"></span>
</div>
@Fred-Vatin
Fred-Vatin / @Mark Jump.md
Last active January 25, 2022 23:41
Custom settings for the VSCode extension Mark Jump

Description

These are custom settings for the VSCode extension Mark Jump

You'll be able to organize your code files in sections and easy jump to either of them :

  • MARKS
  • TODO / FIX
  • NOTE

Just place your sections in comments and respect format below.

@aminone
aminone / adbUsefulCommands.sh
Last active September 14, 2024 13:57
A collection of Android Debug Bridge (ADB) commands
# To get file
adb pull <PATH/TO/FILE/ON/DEVICE>
# To push file
adb push <PATH/TO/FILE> <PATH/TO/DESTINATION>
# To get wifi MAC address
adb shell cat /sys/class/net/wlan0/address
# To get IP Address