Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Plugin Name: Move Accessibility plugins into a single menu
* Plugin URI: https://gist.github.com/brasofilo/4a8c1910a51bf4a06f7cd3e6087abe12
* Gist Plugin URI: brasofilo/4a8c1910a51bf4a06f7cd3e6087abe12
* Gist Plugin URI: https://gist.github.com/brasofilo/4a8c1910a51bf4a06f7cd3e6087abe12
* Description: Moves these 3 plugins: Accessibility Checker, One Click Accessibility, WP Accessibility
* Version: 2023-04-15
* Author: brasofilo
* Author URI: http://wordpress.stackexchange.com/users/12615
<?php
/**
* Plugin Name: Move Snippet
* Plugin URI: http://wordpress.stackexchange.com/questions/57211
* Description: Uses a custom template in the plugin directory accordding to Conditional Tags (http://codex.wordpress.org/Conditional_Tags), maybe even other conditions
* Version: 2023-03-15
* Author: brasofilo
* Author URI: http://wordpress.stackexchange.com/users/12615
* Gist Plugin URI: brasofilo/141df41cb1aff0a0dd9bf4036ff6df01
* Gist Plugin URI: https://gist.github.com/brasofilo/141df41cb1aff0a0dd9bf4036ff6df01
@brasofilo
brasofilo / inject.html
Last active March 30, 2023 02:15
Dolphin's Trigonometry :: WordPress Login Form :: adapted by brasofilo, original code by https://codepen.io/bleepbloop/pen/dyybMq
<div class='container'>
<div class='subcontainer'>
<div class='half'>
<div class='droplet'></div>
<div class='splash'>
<div class='splash-container'>
<div class='circle'></div>
</div>
</div>
</div>
@brasofilo
brasofilo / inject.html
Last active March 30, 2023 02:01
Orbital :: WordPress Login Form :: adapted by brasofilo, original code by https://codepen.io/guerreiro/pen/rNZajZ
<div id="logoBox">
<svg viewBox="0 0 160 160" width="160" height="160">
<circle cx="80" cy="80" r="50" />
<g transform=" matrix(0.866, -0.5, 0.25, 0.433, 80, 80)">
<path d="M 0,70 A 65,70 0 0,0 65,0 5,5 0 0,1 75,0 75,70 0 0,1 0,70Z" fill="#FFF">
<animateTransform attributeName="transform" type="rotate" from="360 0 0" to="0 0 0" dur="1s" repeatCount="indefinite" />
</path>
</g>
<path d="M 50,0 A 50,50 0 0,0 -50,0Z" transform="matrix(0.866, -0.5, 0.5, 0.866, 80, 80)" />
</svg>
# Code from https://python.plainenglish.io/telegram-channel-listener-with-python-8176ebe3c89b
import configparser
import json
import re
from telethon.errors import SessionPasswordNeededError
from telethon import TelegramClient, events, sync
from telethon.tl.functions.messages import (GetHistoryRequest)
from telethon.tl.types import (
PeerChannel
<?php
/* Original code from:
* http://bradt.ca/archives/image-crop-position-in-wordpress/
*
* Modified to WordPress Answers:
* http://wordpress.stackexchange.com/q/51920/12615
*
* Check the function bt_image_make_intermediate_size
* That's where the Thumbnails renaming occurs and all added images must be inserted
*
@brasofilo
brasofilo / services_nextcloud_stack-compose.yml
Created January 22, 2021 03:28 — forked from robin-moser/services_nextcloud_stack-compose.yml
VPS Nextcloud Installation - Single Node Swarm, Portainer, Traefik LB
version: '3.7'
services:
mysql:
image: mariadb:10.3.5
networks:
- default
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_DATABASE: $DB_NAME
@brasofilo
brasofilo / nginx.conf
Created May 10, 2020 13:05 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@brasofilo
brasofilo / embedded-file-viewer.md
Created November 14, 2018 10:30 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

function custom_query_shortcode($atts) {
// EXAMPLE USAGE:
// [loop the_query="showposts=100&post_type=page&post_parent=453"]
// Defaults
extract(shortcode_atts(array(
"the_query" => ''
), $atts));