Skip to content

Instantly share code, notes, and snippets.

View Rodgath's full-sized avatar

Rodgath Rodgath

View GitHub Profile
@Rodgath
Rodgath / rename_images.js
Created July 28, 2023 04:11
Rename image files using JavaScript and Node.js to access the file system.
const fs = require('fs');
const path = require('path');
const inputFolderPath = '/path/to/image/folder/'; // Replace this with the actual path to your image folder
const outputFolderPath = '/path/to/output/folder/'; // Replace this with the path to your desired output folder
const imageFileExtension = '.jpg'; // Change the extension if your images have a different extension
// Function to pad numbers with leading zeros
function padNumberWithZeros(num, width) {
const numString = num.toString();
@Rodgath
Rodgath / plyr-css-style-color-theme.css
Created October 26, 2021 04:23
Plyr CSS style color theme
.plyr__control.plyr__tab-focus {
outline-color : #00b3ff;
}
.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]:before {
background : #00b3ff;
}

Keybase proof

I hereby claim:

  • I am rodgath on github.
  • I am rodgath (https://keybase.io/rodgath) on keybase.
  • I have a public key ASBKK2oajaC0Tip7yHwTSrRq2TxRrV5h-oRWRXIFgf_40Qo

To claim this, I am signing this object:

@Rodgath
Rodgath / CheckIfVimeoVideoExists.php
Last active February 9, 2019 03:42
Check if Vimeo video exists or is playable
<?php
/* You can use the HEAD request method using the video URL. */
function check_remote_video_exists($video_url) {
$headers = @get_headers($video_url);
return (strpos($headers[0], '200') > 0) ? true : false;
}
@Rodgath
Rodgath / php-country-list-array-by-continents.php
Last active February 9, 2019 03:45
PHP Country List Array By Continents
<?php
$country_list = array(
"Africa" => array(
"DZ" => "Algeria",
"AO" => "Angola",
"BJ" => "Benin",
"BW" => "Botswana",
"BF" => "Burkina Faso",
"BI" => "Burundi",
@Rodgath
Rodgath / php-country-list-array-by-sub-continents.php
Last active February 9, 2019 03:45
PHP Country List Array By Sub-continents
<?php
$country_list = array(
"Australia and New Zealand" => array(
"AU" => "Australia",
"NZ" => "New Zealand",
"NF" => "Norfolk Island",
),
"Caribbean" => array(
"AI" => "Anguilla",
@Rodgath
Rodgath / php-regions-and-continent-list-array.php
Last active February 9, 2019 03:45
PHP Regions and Continent list array
<?php
$country_list = array(
"001" => "World",
"002" => "Africa",
"003" => "North America",
"005" => "South America",
"009" => "Oceania",
"011" => "Western Africa",
"013" => "Central America",
@Rodgath
Rodgath / php-country-list-array-ungrouped.php
Last active February 9, 2019 03:46
PHP Country List Arrays - By Continents, Sub-continents and Ungrouped
<?php
$country_list = array(
"AF" => "Afghanistan",
"AL" => "Albania",
"DZ" => "Algeria",
"AS" => "American Samoa",
"AD" => "Andorra",
"AO" => "Angola",
"AI" => "Anguilla",