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
tell application "System Events" | |
try | |
tell process "LimeChat" | |
tell window 1 | |
set position to {-900, 150} | |
set size to {900, 610} | |
end tell | |
end tell | |
end try | |
try |
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/perl | |
use strict; | |
use warnings; | |
use lib qw( lib extlib ); | |
use MT; | |
MT->new; | |
use Data::ObjectDriver; | |
$Data::ObjectDriver::DEBUG = 1; | |
MT->model('blog')->load( |
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
{ | |
"error" : null, | |
"result" : { | |
"messages" : [], | |
"count" : "158", | |
"page" : "1", | |
"page_max" : 4, | |
"columns" : "id,title,author_name,category_id,authored_on,modified_on,comment_count,ping_count", | |
"id" : "_allpass" | |
"filters" : [ |
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/perl | |
# intro for MT::Component::registry() | |
use strict; | |
use warnings; | |
use lib qw( lib extlib ../lib ../extlib); | |
use utf8; | |
use MT; | |
use MT::Component; | |
use Test::More; |
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/perl | |
# MT registry cookbook | |
use strict; | |
use warnings; | |
use lib qw( lib extlib ../lib ../extlib); | |
use utf8; | |
use MT; | |
use MT::Component; | |
use Test::More; |
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/perl | |
# Sample for using MT registry | |
use strict; | |
use warnings; | |
use lib qw( lib extlib ); | |
use MT; | |
use MT::Component; | |
use Data::Dumper; | |
my $c1 = MT::Component->new; | |
$c1->registry({ |
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
### Movable Type content viewer | |
use Plack::Builder; | |
use lib qw( lib extlib ); | |
use Encode; | |
use MT; | |
use MT::FileMgr::Local; | |
use MT::WeblogPublisher; | |
my $mt = MT->new; | |
my $pub = MT::WeblogPublisher->new; | |
my $ContentTypes = { |
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/perl | |
## In sort method, generated sub routine can't access to the lexical variables | |
## of outer scope... | |
use strict; | |
use warnings; | |
sub my_sort ($$) { | |
my ( $a, $b ) = @_; | |
my $foo = 1; |
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/perl | |
package Sudoku; | |
use strict; | |
use warnings; | |
sub new { | |
my $pkg = shift; | |
my $self = bless {}, $pkg; | |
$self->load_puzzle(@_) if @_; |
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:setvar name="mttags" value="mt:CommenterName":"mt:CommentBody":"mtApp:PageActions":"mt:IfNonEmpty":"mt:IncludeBlock":"mt:ArchiveList":"mt:AssetScoreAvg":"mt:CommentPreviewEmail":"mt:FolderHeader":"mt:PageNext":"mt:RemoteSignOutLink":"mt:IfCommentParent":"mt:HTTPContentType":"mt:PageAuthorLink":"mt:BlogLanguage":"mt:NotifyScript":"mt:SetVarBlock":"mt:WebsiteID":"mt:CommenterUserpicAsset":"mt:ArchivePrevious":"mt:EntryAuthorDisplayName":"mt:ArchiveTypeLabel":"mt:CommentScript":"mt:EntryCommentCount":"mt:SubCatIsFirst":"mt:AssetIfTagged":"mt:IfCommentsAccepted":"mt:PreviousLink":"mt:EntryKeywords":"mt:CommentPreviewBody":"mt:SetHashVar":"mt:EntryAdditionalCategories":"mt:AssetDescription":"mt:BlogParentWebsite":"mt:Authors":"mt:PageAuthorURL":"mt:BlogIfCommentsOpen":"mt:CGIPath":"mt:SubFolderRecurse":"mt:IfTypeKeyToken":"mt:AtomScript":"mt:SearchMaxResults":"mt:IfPingsAccepted":"mt:IfCurrentPage":"mt:IfMoreResults":"mt:NextLink":"mt:BlogCategoryCount":"mt:Folders":"mt:CategoryArchiveLink":"mt:PagePermalink": |