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 File::Find::Rule (); | |
use Perl6::Say; | |
say 'RewriteEngine on'; |
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 Net::IP; | |
use NetAddr::IP; | |
use Benchmark ':all'; | |
cmpthese(timethese(1000, { |
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
Set objShell = CreateObject("Shell.Application") | |
Set objWshShell = CreateObject("WScript.Shell") | |
Set fso = CreateObject("Scripting.FileSystemObject") | |
Set folder = fso.GetFolder(objWshShell.CurrentDirectory) | |
Set files = folder.Files | |
For each folderIdx In files | |
ZipFile=folderIdx.Name | |
ExtName = LCase(fso.GetExtensionName(folderIdx.Name)) | |
If ExtName = "zip" Then |
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 | |
=head1 NAME | |
upload2livedoor - upload a jpeg file to livedoor blog via atompub | |
=head1 SYNOPSIS | |
upload2livedoor.pl [userid] [apikey] [filename] |
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 | |
curl -L http://www.metalheadz.co.uk/podcast/podcast2010.xml -o metalheadz.podcast2010.xml | |
grep -nr enclosure metalheadz.podcast2010.xml | perl -nle '($url = $_) =~ s/^.*url="([^"]+)".*$/$1/g; print $url' | head -n 1 | awk '{print "curl -O "$1}' | sh - |
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
$ mkdir evernote | |
$ cd evernote/ | |
$ curl -L -O http://evernote.s3.amazonaws.com/api/evernote-api-1.19.zip | |
$ unzip evernote-api-1.19.zip | |
$ cd evernote-api-1.19/ | |
$ ls sample/ | |
android csharp java javame php python ruby |
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; | |
use Plack::Builder; | |
use Plack::App::Directory; | |
builder { | |
Plack::App::Directory->new({root => "/path/to"})->to_app; |
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 python | |
from xml.etree import ElementTree | |
def main(): | |
namespace = 'http://www.google.com/schemas/sitemap/0.84' | |
xml = ElementTree.parse('./sitemap.xml') | |
root = xml.getroot() | |
for item in root.findall('.//s:loc', namespaces=dict(s=namespace)): | |
print item.text |
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
# Create a new event | |
say '=== Create a new event ==='; | |
my $new_event = { | |
'summary' => '宇宙兄弟', | |
'location' => '日本テレビ', | |
'start' => { | |
'dateTime' => '2012-08-12T07:00:00+09:00', | |
}, | |
'end' => { | |
'dateTime' => '2012-08-12T07:30:00+09:00', |
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/env/perl | |
use strict; | |
use warnings; | |
use feature qw/say/; | |
use FindBin; | |
use Google::API::Client; | |
use OAuth2::Client; |
OlderNewer