Skip to content

Instantly share code, notes, and snippets.

View prappo's full-sized avatar
AI

Prappo prappo

AI
View GitHub Profile
@iacchus
iacchus / install_fonts.sh
Last active April 24, 2024 23:28
Install all Google Fonts on Linux (Debian/Ubuntu etc.)
#!/usr/bin/env sh
# Original author: Michalis Georgiou <mechmg93@gmail.comr>
# Modified by Andrew http://www.webupd8.org <andrew@webupd8.org>
# Current version by Kassius Iacchus https://github.com/iacchus/
# Depends on: `wget`
#
# Install `wget` on Debian/Ubuntu with:
# apt install wget
@pento
pento / php-block.js
Last active February 29, 2024 01:31
Converting a shortcode to a block: this method is fast to do, but a mediocre UX. You should only use this as a stopgap until you can implement a full block UI.
// License: GPLv2+
var el = wp.element.createElement,
registerBlockType = wp.blocks.registerBlockType,
ServerSideRender = wp.components.ServerSideRender,
TextControl = wp.components.TextControl,
InspectorControls = wp.editor.InspectorControls;
/*
* Here's where we register the block in JavaScript.
@johndyer
johndyer / index.php
Last active October 13, 2020 12:25
Gutenberg Shortcode Block with Live Preview
<?php
/**
* Plugin Name: JD Gutenberg Shortcode Preview
* Description: Live shortcode previews in Gutenberg
* Author: johndyer
* Version: 1.0.0
*
*/
// Exit if accessed directly.
@Shaked
Shaked / mouseMovingLines.js
Created October 27, 2017 22:43
Create a horizontal & vertical lines attached to mouse move with KonvaJS
var mouseMovingLines = {
enabled: true,
drawn: false,
xaxisLine: null,
yaxisLine: null,
stage: null,
layer: null,
init: function(stage, layer, options) {
this.options = $.extend({
strokeColor: "#fff",
@FrikkieSnyman
FrikkieSnyman / readme.md
Last active June 24, 2023 08:06
GrapesJS - attributes, classes, and scripts

GrapesJS - attributes, classes, and scripts

Attributes

In order to add custom attributes to an HTML element that is generated by GrapesJS, one can simply make use of traits. For example, if you wish to produce an HTML element which contains the tag data-noout, a trait with the name data-noout can be added to a custom component.

    var domComps = editor.DomComponents;
    var dType = domComps.getType('default');
 var dModel = dType.model;
@OriginalEXE
OriginalEXE / pe-customize-controls.css
Last active June 26, 2023 05:07
Extending WordPress Customizer Panels and Sections to allow nesting
.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent,
#customize-theme-controls .customize-pane-child.current-section-parent {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
transform: translateX(-100%);
}
@anttiviljami
anttiviljami / wp-admin-modal-dialog.php
Last active May 22, 2024 13:05
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>
@gokulkrishh
gokulkrishh / media-query.css
Last active June 28, 2024 09:07
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@idleberg
idleberg / Install-Mcrypt.md
Last active May 31, 2023 17:13
Install Mcrypt on macOS

Setup php-mcrypt on macOS (and versions of Mac OS X)

These steps should have been mentioned in the prerequisites of the Laravel Installation Guide, since I'm surely not the only person trying to get Laravel running on macOS.

Install

Install Mcrypt using Homebrew and PECL (comes with PHP)

# PHP 7.3
@msurguy
msurguy / List.md
Last active April 30, 2024 15:14
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):