Skip to content

Instantly share code, notes, and snippets.

Alpine.directive('typed', (el, { expression, modifiers }, { evaluateLater, effect, cleanup }) => {
const getStrings = evaluateLater(expression);
const modifierValue = (key, fallback) => {
if (-1 === modifiers.indexOf(key)) {
return fallback;
}
const value = modifiers[modifiers.indexOf(key) + 1];

Unicode cheat sheet

A curated list of unicode characters I want to have quick reference toward, including their literal presentation (where possible), description from the unicode table, various representations, and how to enter it as a Vim digraph*.

They are grouped by category, including a link to the relevant Unicode block. Also see the full list of Unicode blocks

@Arifursdev
Arifursdev / phpdangerousfuncs.md
Created January 14, 2024 18:09 — forked from mccabe615/phpdangerousfuncs.md
Dangerous PHP Functions

Command Execution

exec           - Returns last line of commands output
passthru       - Passes commands output directly to the browser
system         - Passes commands output directly to the browser and returns last line
shell_exec     - Returns commands output
\`\` (backticks) - Same as shell_exec()
popen          - Opens read or write pipe to process of a command
proc_open      - Similar to popen() but greater degree of control
pcntl_exec - Executes a program
@Arifursdev
Arifursdev / make_windows10_great_again.bat
Created December 28, 2023 08:16 — forked from IntergalacticApps/make_windows10_great_again.bat
Make Windows 10 Great Again - stop Windows 10 spying!
@echo off
setlocal EnableDelayedExpansion
ver | find "10." > nul
if errorlevel 1 (
echo Your Windows version is not Windows 10... yet. Brace yourself, Windows 10 is coming^^!
pause
exit
)
@Arifursdev
Arifursdev / theme-helper.php
Created January 22, 2022 07:16 — forked from josanua/theme-helper.php
Theme Dev Helper
<?php
// General info
https://codex.wordpress.org/Theme_Development
// Core info
https://wp-learner.com/wotdpress-development/wordpress-core-files-and-functions/
// Theme Handbook
https://developer.wordpress.org/themes/
@Arifursdev
Arifursdev / WP-HTML-Compression
Created June 24, 2021 16:05 — forked from sethbergman/WP-HTML-Compression
Minify HTML for WordPress without a Plugin - Add to function.php
<?php
class WP_HTML_Compression
{
// Settings
protected $compress_css = true;
protected $compress_js = true;
protected $info_comment = true;
protected $remove_comments = true;
// Variables
@Arifursdev
Arifursdev / npmcrashcourse.txt
Created January 31, 2021 12:35 — forked from bradtraversy/npmcrashcourse.txt
NPM Crash Course Commands
# GET VERSION
npm -v (or --version)
# GET HELP
npm help
npm
# CREATE PACKAGE.JSON
npm init
npm init -y (or --yes)
@Arifursdev
Arifursdev / updated-fonts-filters.css
Created January 10, 2021 09:07 — forked from shopifypartners/updated-fonts-filters.css
Section of stylesheet showing how variables are assigned & how filters are applied - https://www.shopify.com/partners/blog/font-picker
{% assign header_font = settings.header_font_new %}
{% assign base_font = settings.base_font_new %}
{{ header_font | font_face }}
{{ base_font | font_face }}
{%- assign base_font_bold = base_font | font_modify: 'weight', 'bolder' -%}
{%- assign base_font_italic = base_font | font_modify: 'style', 'italic' -%}
{%- assign base_font_bold_italic = base_font_bold | font_modify: 'style', 'italic' -%}
@Arifursdev
Arifursdev / remove-empty-p.php
Created December 10, 2020 14:32 — forked from ninnypants/remove-empty-p.php
Remove empty p tags from WordPress posts
<?php
add_filter( 'the_content', 'remove_empty_p', 20, 1 );
function remove_empty_p( $content ){
// clean up p tags around block elements
$content = preg_replace( array(
'#<p>\s*<(div|aside|section|article|header|footer)#',
'#</(div|aside|section|article|header|footer)>\s*</p>#',
'#</(div|aside|section|article|header|footer)>\s*<br ?/?>#',
'#<(div|aside|section|article|header|footer)(.*?)>\s*</p>#',
'#<p>\s*</(div|aside|section|article|header|footer)#',