Skip to content

Instantly share code, notes, and snippets.

View chrislowles's full-sized avatar

Chris Lowles chrislowles

View GitHub Profile
@jonathonbyrdziak
jonathonbyrdziak / CustomWidgetFile.php
Last active September 29, 2022 22:00
EMPTY WIDGET Plugin code to create a single widget in wordpress.
<?php
/**
* Duplicate this file as many times as you would like, just be sure to change the
* Empty_Widget class name to a custom name of your choice. Have fun! redrokk.com
*
* Plugin Name: Empty Widget
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Contact_RedRokk_Widget keyword to rebrand this class for your needs.
* Author: RedRokk Interactive Media
* Version: 1.0.0
* Author URI: http://www.redrokk.com
@steven2358
steven2358 / ffmpeg.md
Last active November 11, 2024 04:45
FFmpeg cheat sheet
@bijij
bijij / viewimage.user.js
Last active November 11, 2024 07:06
Userscript version of the View Image chrome extension
// ==UserScript==
// @name View Image
// @namespace https://github.com/bijij/ViewImage
// @version 4.1.1
// @description This userscript re-implements the "View Image" and "Search by image" buttons into google images.
// @author Joshua B
// @run-at document-end
// @include http*://*.google.tld/search*tbm=isch*
// @include http*://*.google.tld/imgres*
// @updateURL https://gist.githubusercontent.com/bijij/58cc8cfc859331e4cf80210528a7b255/raw/viewimage.user.js
@aziraphale
aziraphale / ublock-origin-filter.txt
Created February 1, 2020 01:50
uBlock Origin: Hide YouTube's "Breaking news" section
! [Add this to the "My filters" section of uBlock Origin's settings]
! ### Remove YouTube's gorram "Breaking news" section ###
! ### I go to YouTube to AVOID daily bullshit, not to have it shoved in my face!! ###
! This removes page-width blocks - `<ytd-rich-section-renderer>` tags - which have a descendent somewhere with ID "title" and the text "Breaking news".
! The match on "Breaking news" uses a regular expression primarily so that it can be made case-insensitive.
! The `#title` tag we're matching looked like this, at least for me on 2020-02-01:
! <span id="title" class="style-scope ytd-rich-shelf-renderer">Breaking news</span>
! The other two `:has()` rules are just a bit of extra filtering that I hope might improve performance and/or reduce the chance of this rule matching where it's not wanted.
! YouTube is likely to change things and break this rule before too long, in which case removing `:has(:scope #dismissable)` and `:has(:scope #featured-badge)` may help.
! Note that `:scope` limits matches to
@johnnypea
johnnypea / useful-one-liners.sh
Last active August 4, 2024 04:09
Useful one liners
# Run the last command as root
sudo !!
# Serve current directory tree at http://$HOSTNAME:8000/
python -m SimpleHTTPServer
# Save a file you edited in vim without the needed permissions
:w !sudo tee %
# change to the previous working directory
cd -
# Runs previous command but replacing
^foo^bar
@mambru82
mambru82 / url-regex-tutorial.md
Created April 19, 2021 02:49
regex tutorial for URL matching

Matching a URL using regular expressions - a tutorial

The following gist gives a thorough description of the central components in matching a given URL utilizing regular expressions in Javascript.

Summary

Regex uses a sequence of characters to define a specific search pattern. In the URL matching regex, regex matches any valid URL.

/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/
@agyild
agyild / FSR.glsl
Last active November 5, 2024 05:34
AMD FidelityFX Super Resolution v1.0.2 for mpv
// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
//
// 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
// ==UserScript==
// @name @chaoticvibing Twitter Blue Nerd - twitter.com
// @namespace Violentmonkey Scripts
// @match *://*.twitter.com/*
// @match *://*.x.com/*
// @grant none
// @version 1.9.2
// @author @chaoticvibing - GH @busybox11
// @description 11/9/2022, 11:45:28 PM
// @updateURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw
// ==UserScript==
// @name Mastodon Bird UI
// @description A UserScript that applies the Mastodon Bird UI style to ieji.de
// @version 5
// @match https://ieji.de/*
// @icon https://github.com/mastodon/mastodon/raw/main/public/favicon.ico
// @grant GM_addStyle
// @grant GM_getResourceText
// @homepage https://gist.github.com/egecelikci/bcd4d543564cba8ebe6536f23886fcd9
// @downloadURL https://gist.github.com/egecelikci/bcd4d543564cba8ebe6536f23886fcd9/raw/mastodon-bird-ui.user.js