Skip to content

Instantly share code, notes, and snippets.

View jpluimers's full-sized avatar

Jeroen Wiert Pluimers jpluimers

  • wiert.me
  • Amsterdam, The Netherlands
View GitHub Profile
@jpluimers
jpluimers / tweet-to-video-JSON-bookmarklet.url
Last active September 23, 2023 17:25
Get Tweet JSON from Twitter containing the mp4 Video URLs
javascript:{ tweetID = document.location.href.split('/').filter(e => e).slice(-1); url = new URL(`https://cdn.syndication.twimg.com/tweet-result?id=${tweetID}&token=!`); open(url); }
@jpluimers
jpluimers / 01.post-ID.js
Last active September 14, 2023 20:31
Scripts for "Some JavaScript bookmarklets for WordPress published pages centered around navigation and IDs" https://wiert.me/2023/07/20/some-javascript-bookmarklets-for-wordpress-published-pages-centered-around-navigation-and-ids/
document.getElementsByName("comment_post_ID")[0]?.value
// 85080
@jpluimers
jpluimers / gist:e7bf559bd5ab72495abd4f17dc873777
Created August 29, 2023 06:06 — forked from tayvano/gist:6e2d456a9897f55025e25035478a3a50
complete list of ffmpeg flags / commands
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)
@jpluimers
jpluimers / Normalize_Audio.sh
Created August 29, 2023 06:05 — forked from paius1/Normalize_Audio.sh
Normalize audio in a file using ffmpeg-filter compand
#!/usr/bin/env bash
# Normalize audio stream in video file so explosions don't cover up dialogue
#
# For PcManFm custom actions using ffmpeg and yad
#
# Many thanks to Rupert Plumridge www.prupert.co.uk for the code to create a progress bar
# &
# https://gist.github.com/leesei
# for bash uri parser
# &
2023-07-27 13:34:47,915 18976 [DEBUG] - XmlConfiguration is now operational
2023-07-27 13:34:47,960 18976 [DEBUG] - Adding new type 'CygwinService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2023-07-27 13:34:47,961 18976 [DEBUG] - Adding new type 'CygwinService' for type 'IInstallSourceRunner' from assembly 'choco'
2023-07-27 13:34:47,962 18976 [DEBUG] - Adding new type 'PythonService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2023-07-27 13:34:47,962 18976 [DEBUG] - Adding new type 'PythonService' for type 'IListSourceRunner' from assembly 'choco'
2023-07-27 13:34:47,962 18976 [DEBUG] - Adding new type 'PythonService' for type 'IInstallSourceRunner' from assembly 'choco'
2023-07-27 13:34:47,963 18976 [DEBUG] - Adding new type 'PythonService' for type 'IUninstallSourceRunner' from assembly 'choco'
2023-07-27 13:34:47,963 18976 [DEBUG] - Adding new type 'RubyGemsService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2023-07-27 13:34:47,964 18976 [DEBUG] - Adding new ty
@jpluimers
jpluimers / openssh-for-windows-proxyjump-guide.md
Created July 26, 2023 10:24 — forked from yiays/openssh-for-windows-proxyjump-guide.md
How to setup OpenSSH for Windows for ProxyJumping

ProxyJumping

Introduction

ProxyJumping is a method used to get access to a terminal in a private network via SSH.

First, you SSH into a JumpGate (a SSH server exposed to the internet), and then use that JumpGate to pass through a SSH connection to a machine on the JumpGate's local network. By the end of this guide, you should be able to seamlessly connect to a remote private host through a JumpGate with one parameter in a ssh command.

Security should always be paramount when establishing connections like this because the password of a JumpGate can and will be brute-forced by bots on the internet constantly.

Compatiblilty notes

The provided client-side commands are intended for PowerShell. Open PowerShell by right-clicking on the start menu button and selecting Windows Powershell.

@jpluimers
jpluimers / rsync.xml
Created July 24, 2023 14:32 — forked from ddebin/rsync.xml
ESXi service description for rsync in daemon mode.
<ConfigRoot>
<service>
<id>rsync</id>
<rule id="0000">
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>873</port>
</rule>
<rule id="0001">
@jpluimers
jpluimers / bookmarklet.url
Created July 19, 2023 14:06
Bookmarklet which prompts an HTML anchor with the canonical post address
javascript:{var postID=document.getElementsByName("comment_post_ID")[0]?.value; a=document.createElement("a"); a.href=HighlanderComments.connectURL; a.pathname=''; a.search=`?p=${postID}`; a.hash=''; a.target="blank"; a.rel="noopener"; a.text=document.querySelector('meta[property="og:title"]')?.content; prompt("Anchor", a.outerHTML); }
@jpluimers
jpluimers / bookmarklet.url
Last active July 19, 2023 15:43
Bookmarklet which allows me to edit the blog post I am viewing (which works for for preview and unpublished posts as well)
javascript:{ var postID = document.getElementsByName("comment_post_ID")[0]?.value; var a = document.createElement("a"); if (postID === undefined) { a.href = document.querySelector('link[rel="EditURI"]').href; var searchParams = new URLSearchParams(window.location.search); postID = searchParams.get("p");} else { a.href=HighlanderComments.connectURL; }; a.pathname='wp-admin/post.php'; a.search=`post=${postID}&action=edit&classic-editor`; a.hash=''; open(a.href); }
@jpluimers
jpluimers / enableMastodonPublishing.js
Last active July 3, 2023 13:22
JavaScript Bookmarklet for the WordPress classic editor which enables mastodon publishing (assuming you have at least one mastodon publishing account enabled under https://jetpack.com/redirect/?source=jetpack-social-connections-classic-editor / https://wordpress.com/marketing/connections/)
javascript:(function(){
publicizeFormEditHref = document.getElementById('publicize-form-edit'); // "edit" href
if(publicizeFormEditHref) {
publicizeFormEditHref.click();
}
mastodonCheckboxes = document.getElementsByClassName('wpas-submit-mastodon'); // any Mastodon checkboxes (one can have zero or more accounts configured)
Array.from(mastodonCheckboxes).forEach((mastodonCheckbox) => {
mastodonCheckbox.checked = true;
});
publicizeFormHideHref = document.getElementById('publicize-form-hide'); // "OK" button disguised as href