This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -n "data:image/png;base64," > img.txt; base64 -w 0 img.png >> img.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jQuery Plugin Boilerplate | |
// A boilerplate for jumpstarting jQuery plugins development | |
// version 1.1, May 14th, 2011 | |
// by Stefan Gabos | |
// http://stefangabos.ro/jquery/jquery-plugin-boilerplate-revisited/#requirements | |
// remember to change every instance of "pluginName" to the name of your plugin! | |
(function($) { | |
// here we go! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @custom:mytheme | |
* Enqueue scripts and styles. Different paths depending on `SCRIPT_DEBUG` value, | |
* first resource found is used: this allows using file names including hashes | |
* (webpack style) to avoid chaching, i.e. `main.[hash].css` | |
* https://codex.wordpress.org/Debugging_in_WordPress | |
*/ | |
function mytheme_scripts() { | |
$assetsDir = (SCRIPT_DEBUG == true ? '/dev' : '/dist'); | |
$dir = new DirectoryIterator(get_stylesheet_directory() . $assetsDir); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// React tutorial: tic-tac-toe game | |
// https://reactjs.org/tutorial/tutorial.html | |
// https://davidfq.me/blog/react-first-steps/ | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import './index.css'; | |
function Square(props) { |