Skip to content

Instantly share code, notes, and snippets.

View funky-monkey's full-sized avatar

Sidney de Koning funky-monkey

View GitHub Profile
@funky-monkey
funky-monkey / remove_admin_shizzle.php
Created October 19, 2023 10:04
Menu items weghalen in Wordpress
function hide_wordpress_icon() {
echo "<style>#wp-admin-bar-wp-logo, #wp-admin-bar-comments {
border: 0; clip: rect(0 0 0 0); height: 1px;margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }</style>";
}
add_action('admin_head', 'hide_wordpress_icon');

Fix unclean restart:

sudo fsck -y /dev/sda1 && sudo reboot

Umbrel.local - not accessible - what to do

I see a lot of users having issues connecting to umbrel.local and most of them are Windows users. People… please before getting into running a node, DYOR and learn at least basics about networking, TCP/IP, IPs, LAN, WAN.

Running a node is something serious, is not a toy!

ssh-copy-id -i ~/.ssh/mykey user@host

Test it: ssh -i ~/.ssh/mykey user@host

OR: cat ~/.ssh/raspberry-pi.pub | ssh user@12.34.56.78 "mkdir -p ~/.ssh &amp;&amp; cat &gt;&gt; ~/.ssh/authorized_keys

Download YouTube playlist videos in separate directory indexed by video order in a playlist

youtube-dl -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re

Download all playlists of YouTube channel/user keeping each playlist in separate directory:

youtube-dl -o '%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/user/TheLinuxFoundation/playlists

A very simple and straightforward way that worked for me is as follows:

Stop apache2.

sudo service apache2 stop

Uninstall Apache2 and its dependent packages.

Error

Ran into an issue, where for some reason, on one of my Macs, XCode swift works fine, but on another, I got an error like:

$ xcrun --sdk macosx --find xctest
xcrun: error: unable to find utility “xctest”, not a developer tool or in PATH
Now that all modern browsers support SVG favicons, here's how to turn any emoji into a favicon.svg:
<svg xmlns="http://w3.org/2000/svg" viewBox="0 0 100 100">
<text y=".9em" font-size="90">
Pile of poo
</text>
</svg>
Useful for quick apps when you can't be bothered to design a favicon!

This Gist contains an example code fragment of how to read temperature and humidity data from Inkbird ibs-TH1 bluetooth thermometer in NodeJS with Noble.

Note that you can also read values directly via command line with gatttool:

gatttool -b <MAC> --char-read --handle=0x002d

Example value:

@funky-monkey
funky-monkey / feed.xml
Created January 9, 2021 12:04 — forked from jackrhysider/feed.xml
Podcast RSS Feed XML file for Jekyll
---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0" xmlns:media="http://www.rssboard.org/media-rss" version="2.0">
<channel>
<title>Darknet Diaries</title>
<link>https://darknetdiaries.com/</link>
<language>en-us</language>
<atom:link href="{{ site.url }}/feed.xml" rel="self" type="application/rss+xml" />
#! /bin/bash
# Information came from https://apple.stackexchange.com/questions/358651/unable-to-completely-uninstall-zoom-meeting-app
# I just added more stuff to delete so there is no manual stuff to execute.
echo Zoom cleanup 🧹
echo Cleaning Application Cached Files...
sudo rm -rf ~/Library/Application\ Support/zoom.us
sudo rm -fr ~/Library/Application\ Support/ZoomPresence
echo Cleaning Application...