Skip to content

Instantly share code, notes, and snippets.

View madila's full-sized avatar

Ruben madila

View GitHub Profile
@madila
madila / index.html
Last active November 24, 2023 09:49
Invisible audio play after first click
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
html, body {
margin: 0;
}
*, *::before, *::after {
@madila
madila / World-TopoJSON-with-UK-division.json
Created March 10, 2022 08:58
World TopoJSON with division of UK countries - March 2022
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@madila
madila / countryList.js
Created March 10, 2022 08:57
List of Countries - March 2022
let countryList = [
{"code" : "AF", "name" : 'Afghanistan'},
{"code" : "AL", "name" : 'Albania'},
{"code" : "DZ", "name" : 'Algeria'},
{"code" : "AD", "name" : 'Andorra'},
{"code" : "AO", "name" : 'Angola'},
{"code" : "AI", "name" : 'Anguilla'},
{"code" : "AQ", "name" : 'Antarctica'},
{"code" : "AG", "name" : 'Antigua and Barbuda'},
{"code" : "AR", "name" : 'Argentina'},
@madila
madila / adobe-fonts-for-gutenberg.php
Last active October 27, 2021 10:19
Add Adobe Fonts kit to WordPress new Editor
<?php
/*
Plugin Name: My Theme - Enqueue Adobe Fonts
Plugin URI: https://wordpress.org
Description: Must-use plugin for custom actions and filters to run for a site
Version: 0.1
Author: Ruben Madila
Author URI: https://rubenmadila.com
*/
@madila
madila / gist:178af482c5799a0968d4200e67baefec
Created March 31, 2021 06:30 — forked from discordier/gist:ed4b9cba14652e7212f5
options for phpStorm @noinspection annotation
javascript
ES6ValidationInspection
JSAccessibilityCheckInspection
JSBitwiseOperatorUsageInspection
JSCheckFunctionSignaturesInspection
JSClosureCompilerSyntaxInspection
JSCommentMatchesSignatureInspection
JSComparisonWithNaNInspection
JSConsecutiveCommasInArrayLiteralInspection
@madila
madila / WordPressMultisiteValetDriver
Last active July 17, 2020 10:02
Custom Valet Driver for Wordpress Multisite in Subdirectories
<?php
/*
Valet driver for Wordpress Multisite
Forked from: https://github.com/fewagency/best-practices/blob/master/Wordpress/WordPressMultisiteValetDriver.php
Usage: Drop this file into your ~/.valet/Drivers/ directory. Modify the subfolders variables to include yours.
*/
@madila
madila / WordPress:PluginHeader
Created December 30, 2019 19:02 — forked from rabbitinblack/WordPress:PluginHeader
Wordpress : Plugin Header Comment
<?php
/**
* Plugin Name:
* Plugin URI:
* Description:
* Version: 1.0
* Author: Rabbitinblack
* Author URI: http://www.rabbitinblack.com
* License: GPL2
*/
@madila
madila / customizer-links.php
Created July 5, 2019 14:40 — forked from slushman/customizer-links.php
How to link into the WordPress Customizer
@madila
madila / enqueue-assets-template.php
Created July 2, 2019 11:51
Webpack Hashed Assets Theme for Wordpress (Just the require structure)
/* File location: /src/enqueue-assets-template.php */
<?php
/**
* Template for the webpack config to be replace the appropiate assets. It uses the shortcode format [asset_name]
* The asset name is the webpack [name] of the original asset minus the extension, e.g. [theme.styles] for theme.styles.css
* Enqueue scripts and styles.
*/
function webpack_enqueue_assets() {
@madila
madila / ofc-social-sharing.php
Created April 19, 2018 11:13
OFC Social Sharing Buttons
<?php
/*
Drop In Function for your theme.
Usage in the loop: ofc_social_sharing_buttons(get_the_ID());
*/
function ofc_social_sharing_buttons($id = null) {
global $post;
$id = ($id) ? $id : $post->ID;