Skip to content

Instantly share code, notes, and snippets.

View paradigmaweb's full-sized avatar

javiereduardo paradigmaweb

View GitHub Profile
@paradigmaweb
paradigmaweb / LogFile.udl.xml
Created May 31, 2020 16:51 — forked from mmdemirbas/LogFile.udl.xml
Custom log file syntax highlighting for Notepad++
<NotepadPlus>
<UserLang name="LogFile" ext="log">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="no" commentLine="no" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">[(0])0</Keywords>
<Keywords name="Folder+"></Keywords>
@paradigmaweb
paradigmaweb / 2011-08-18_whmscripts_disabling_invoice_emails.md
Created December 19, 2021 16:01 — forked from RWJMurphy/2011-08-18_whmscripts_disabling_invoice_emails.md
WHMScripts: Disabling invoice creation emails in WHMCS on a per-client basis

If you’re using WHMCS to manage your cPanel shared servers, this is probably a request that you’ve received a few times. You have clients that are set up to pay invoices automatically from their credit cards, and they’d rather not receive the “Invoice Created” or “Invoice Payment Reminder” emails every month.

Normally WHMCS only allows you to disable these emails globally but, by making use of the EmailPreSend action hook, we can set up a list of clients not to receive these.

To get started just download the following script, change the file extension to .php, edit it to set up the $client_ids and place it in your WHMCS /includes/hooks/ directory

Please note, this script doesn’t disable only the automatically sent invoice notification emails, but also blocks manual sending of these for the selected clients.

(originally posted at http://whmscripts.net/whmcs/2011/disabling-invoice-creation-emails-in-whmcs-on-a-per-client-basis/)

@paradigmaweb
paradigmaweb / hooks.php
Created December 22, 2021 19:53 — forked from tripflex/hooks.php
Require Company Name for WHMCS User
<?php
add_hook( 'ClientDetailsValidation', 1, function( $vars ){
if( ! isset( $_POST['companyname'] ) || empty( $_POST['companyname'] ) ){
return 'You did not enter a Company Name. If you do not have a company name, please just enter your name.';
}
});
add_hook( "ClientAreaFooterOutput", 1, function( $vars ){
@paradigmaweb
paradigmaweb / YTMLikesToPlaylist.md
Created March 15, 2023 01:22 — forked from BrianLincoln/YTMLikesToPlaylist.md
YouTube Music Likes to Playlist

Copy Likes to a playlist in YouTube Music

This is a very hacky solution to copy Liked songs to a playlist since YTM still doesn't have the functionality. I'm using this to copy songs out of YTM to another service, then unsubscribing. Thus, I won't be maintaining it (or ever using it again). It will only work while the YTM interface is the same as it is today (3/6/21) and will break once they make updates.

Steps to use:

  1. Create a new playlist
  2. Go to your Likes page (in chrome, on a desktop or laptop). Scroll to the bottom so all songs are loaded
  3. Open Chrome's dev tools (F12 on windows), go to the console
  4. Paste the script below. Edit the first line, replace "YOUR_PLAYLIST_NAME" with your playlist's name
  5. Press enter