Skip to content

Instantly share code, notes, and snippets.

View makotoworld's full-sized avatar
😉
Happy Coding!

nzk makotoworld

😉
Happy Coding!
View GitHub Profile
Write
id
title
created
user_id
file_id
File
id
file_type
require 'open-uri'
require 'nokogiri'
# スクレイピング先のURL
url = 'http://ishidatozanjukunisshi.blogspot.jp'
#url = 'http://ishidatozanjukunisshi.blogspot.jp/search?updated-max=2010-06-20T21:17:00%2B09:00&max-results=7&start=985&by-date=false'
charset = nil
def url_set(url)
html = open(url) do |f|
We couldn’t find that file to show.
#!usr/bin/perl
use Perl6::Say;
use Data::Dumper;
my %hash = ('makoto' => 'perl',
'nozaki' => {});
sub push_hash{
my %hash = @_;
#!/usr/bin/perl
use strict;
use warnings;
use Perl6::Say;
use Data::Dumper;
use DateTime;
use LWP::UserAgent;
#!/usr/bin/perl
use strict;
use warnings;
use Imager;
my $filename = shift;
my $img = Imager->new;
$img->read( file => $filename ) or die $img->errstr;
$img->filter( type => 'contrast', intensity => 1.3 );
#!/usr/bin/perl
use strict;
use warnings;
use WebService::Simple;
use WebService::Simple::Parser::JSON;
use Perl6::Say;
use Data::Dumper;
use Encode;
@makotoworld
makotoworld / DB.pm
Created February 25, 2010 08:16
DeafNewsJp by Perl
#!/usr/bin/perl;
#DB.pm
package DB;
use DBIx::Skinny connect_info => +{
dsn => 'dbi:mysql:deafnews:localhost',
username => 'root',
password => 'password',
connect_options => +{
RaiseError => 1,
PrintError => 0,
my $charcter = "あいうえお";
utf8::decode($charcter);
print '検証文字列: ',$charcter,"\n";
if($charcter !~ /([\x{3041}-\x{30F6}])/) {
print 'ひらがなとカタカナが含まれていません';
}