Skip to content

Instantly share code, notes, and snippets.

View prappo's full-sized avatar
AI

Prappo prappo

AI
View GitHub Profile
<?php
function change_version($pattern, $version) {
// Iterate over each file and its patterns in the pattern array
foreach ($pattern as $file => $patterns) {
// Check if the file exists before proceeding
if (file_exists($file)) {
// Get the file content
$content = file_get_contents($file);
{
"name": "wp-simple-pay-lite",
"title": "WP Simple Pay Lite for Stripe",
"description": "Add high conversion Stripe Checkout forms to your WordPress site and start accepting payments in minutes. **Lite Version**",
"version": "4.10.0",
"license": "GPL-2.0-or-later",
"homepage": "https://wpsimplepay.com/",
"repository": {
"type": "git",
"url": "https://github.com/wpsimplepay/wp-simple-pay-lite"
@prappo
prappo / wp-admin-modal-dialog.php
Created May 22, 2024 13:05 — forked from anttiviljami/wp-admin-modal-dialog.php
WordPress admin modal dialog example
<?php
// enqueue these scripts and styles before admin_head
wp_enqueue_script( 'jquery-ui-dialog' ); // jquery and jquery-ui should be dependencies, didn't check though...
wp_enqueue_style( 'wp-jquery-ui-dialog' );
?>
<!-- The modal / dialog box, hidden somewhere near the footer -->
<div id="my-dialog" class="hidden" style="max-width:800px">
<h3>Dialog content</h3>
<p>This is some terribly exciting content inside this dialog. Don't you agree?</p>
@prappo
prappo / animation.html
Created June 14, 2023 15:22
konva js animation
<!DOCTYPE html>
<html lang="en">
<head>
<title>Home</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<style>
body {
font-family: sans-serif;
}
This file has been truncated, but you can view the full file.
(function(Qi,Pu){typeof exports=="object"&&typeof module<"u"?Pu(exports):typeof define=="function"&&define.amd?define(["exports"],Pu):(Qi=typeof globalThis<"u"?globalThis:Qi||self,Pu(Qi.labelbaker=Qi.labelbaker||{}))})(this,function(Qi){"use strict";const Pu="";var Xx=(A,t,e)=>{if(!t.has(A))throw TypeError("Cannot "+e)},Im=(A,t,e)=>{if(t.has(A))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(A):t.set(A,e)},Tu=(A,t,e)=>(Xx(A,t,"access private method"),e),Yx=Math.PI/180;function Jx(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const is=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},Wt={_global:is,version:"8.4.2",isBrowser:Jx(),isUnminified:/param/.test(function(A){}.toString()),dblClickWindow:400,getAngle(A){return Wt.angleDeg?A*Yx:A},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseLis
@prappo
prappo / install_fonts.sh
Created January 27, 2023 15:31 — forked from iacchus/install_fonts.sh
Install all Google Fonts on Linux (Debian/Ubuntu etc.)
#!/usr/bin/env sh
# Original author: Michalis Georgiou <[email protected]>
# Modified by Andrew http://www.webupd8.org <[email protected]>
# Current version by Kassius Iacchus https://github.com/iacchus/
# Depends on: `wget`
#
# Install `wget` on Debian/Ubuntu with:
# apt install wget
@prappo
prappo / .wp-env.json
Last active August 8, 2024 11:03
Enable WordPress debugging and map debug.log file for wp-env
{
"plugins": ["."],
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
"SCRIPT_DEBUG": true,
"WP_DEBUG_DISPLAY": true,
"WP_PHP_BINARY": "php"
},
"mappings": {
version: "3.7"
services:
traefik:
image: traefik:v2.0
command: --providers.docker
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
web1:
@prappo
prappo / docker-compose.yml
Created October 6, 2021 11:32
Docker WordPress Development Environment
version: "3.3"
services:
db:
container_name: 'wordpress-database'
image: 'mysql:5.7'
volumes:
- './database/mysql:/var/lib/mysql'
ports:
- 18766:3306
environment:
@prappo
prappo / media-query.css
Created June 11, 2021 18:50 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */