This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
BEGIN { | |
use Cwd qw(getcwd); | |
$ENV{MT_HOME} ||= getcwd; | |
} | |
use lib "$ENV{MT_HOME}/lib", "$ENV{MT_HOME}/extlib"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
<<__KNOWN_HOSTS___ | |
github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== | |
__KNOWN_HOSTS___ | |
exec ssh -o UserKnownHostsFile="$0" -o CheckHostIP=no "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$entries = include('https://example.com/mt/mt-data-api.cgi/v1/sites/1/entries.php'); | |
foreach ($entries as $e) { | |
// Do stuff | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data = file_get_contents('https://example.com/mt/mt-data-api.cgi/v1/sites/1/entries'); | |
$entries = json_decode($data); | |
foreach ($entries as $e) { | |
// Do stuff | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id: DataAPIFormatPHP | |
name: DataAPIFormatPHP | |
version: 0.01 | |
description: "This plugin enables the Data API to export data in PHP source code." | |
author_name: "Taku AMANO" | |
author_link: http://taaas.jp/ | |
plugin_link: https://github.com/usualoma/mt-plugin-DataAPIFormatPHP/ | |
applications: | |
data_api: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package MT::Plugin::ReturnURI; | |
use strict; | |
use MT; | |
use MT::Plugin; | |
our $VERSION = '1.00'; | |
use base qw( MT::Plugin ); | |
my $plugin = MT::Plugin::ReturnURI->new; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ls -l test.jpg | |
-rw-r--r-- 1 taku taku 30861 9月 9 16:39 test.jpg | |
% rpm -qa | grep -i 'png\|jpe\?g\|magick' | |
libpng-devel-1.2.10-7.1.el5_3.2 | |
ImageMagick-perl-6.2.8.0-4.el5_1.1 | |
libjpeg-6b-37 | |
ImageMagick-6.2.8.0-4.el5_1.1 | |
libpng-1.2.10-7.1.el5_3.2 | |
% perl -MImage::Magick -e '$m = Image::Magick->new; $m->Read("test.jpg"); $m->Resize('width' => 10, 'height' => 10); open($fh, ">", "resized.jpg"); print($fh $m->ImageToBlob);' | |
% ls -l resized.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mt:TagOverride name="Entries"> | |
<mt:ContentsOverride> | |
<li><mt:SuperContents /></li> | |
</mt:ContentsOverride> | |
<ul> | |
<mt:SuperTag> | |
</ul> | |
</mt:TagOverride> | |
<mt:Entries> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
menus: | |
quickrebuild: | |
label: Rebuild | |
order: 1000 | |
mode: rebuild_confirm | |
args: | |
quick_rebuild: 1 | |
quickrebuild:index: | |
label: Only Indexes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub init_app { | |
my ($plugin, $app) = @_; | |
my $menus = $plugin->{registry}->{applications}->{cms}->{menus}; | |
$menus->{'quickrebuild'} = { | |
label => 'Rebuild', | |
order => 1000, | |
mode => 'rebuild_confirm', | |
}; | |
$menus->{'quickrebuild:index'} = { |
OlderNewer