Skip to content

Instantly share code, notes, and snippets.

@phpdude
phpdude / nginx.conf
Last active February 28, 2024 04:36
Nginx image filter + caching of results.
location /resize {
alias /tmp/nginx/resize;
set $width 150;
set $height 100;
set $dimens "";
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) {
set $width $1;
set $height $2;
set $image_path $3;
@chrisguitarguy
chrisguitarguy / list-table-tut.php
Created September 14, 2012 22:14
Code for a tutorial on adding columns to WordPress list tables.
<?php
/*
Plugin Name: List Table Tutorial
Plugin URI: http://pmg.co/wp-list-table-tutorial
Description: How to add a column to WordPress list tables.
Version: 1.0
Text Domain: pmg-list-table
Author: Christopher Davis
Author URI: http://christopherdavis.me
License: GPL2
@zerosignalproductions
zerosignalproductions / admin.js
Last active November 21, 2018 17:16
Insert an image into the wordpress editor always wrapped in a figure tag. The javascript is used to remove the figure element from the editor if the delete button is used. Note that the inline edit does not work with this code.
(function($) {
$(document).ready(function() {
$('body').on('mousedown', '#wp_delimgbtn', function(e) {
var editor = tinyMCE.activeEditor,
element = editor.selection.getNode();
if(element.tagName !== 'FIGURE') {
$(element).parents('figure').remove();
}
});
@peterrattew-old
peterrattew-old / functions.php
Created March 21, 2017 16:02
On the fly resizing with Wordpress and NGINX
<?php
add_filter('image_downsize', 'custom_image_downsize', 10, 3);
function custom_image_downsize($value = false, $post_id, $size = 'medium') {
global $_wp_additional_image_sizes;
if(is_array($size)) {
$width = (int) @$size[0];
$height = (int) @$size[1];
$crop = (@$size[2]) ? 'c' : '';
@Informatic
Informatic / README.md
Last active June 26, 2024 02:56
openlgtv webOS hacking notes

This is just a dump of some interesting undocumented features of webOS (3.8 specifically, on early 2018 4k LG TV) and other development-related tips.

Homebrew app ideas

@throwaway96
throwaway96 / crashd.md
Last active July 21, 2024 15:58
crashd instructions

News

EOL (2024-07-21)

I'm not going to be maintaining this document anymore. I'm leaving it as-is since much of the FAQ section is still accurate and has yet to be incorporated into other resources.

Use CanI.RootMy.TV to find an exploit for your TV.

New exploit for webOS 3.5+: DejaVuln (2024-04-21)