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
require 'net/http' | |
require 'json' | |
require 'cgi' | |
class Lingr | |
def initialize(api_key) | |
@api_key = api_key | |
@http = nil | |
Net::HTTP.start('www.lingr.com', 80) do |h| | |
@http = h |
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
Index: src/term.c | |
=================================================================== | |
--- src/term.c (revision 1318) | |
+++ src/term.c (working copy) | |
@@ -5152,7 +5152,7 @@ | |
#ifdef FEAT_MBYTE | |
/* skip multibyte char correctly */ | |
- for (i = (*mb_ptr2len)(src); i > 0; --i) | |
+ if ((i = (*mb_ptr2len)(src)) == 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
use strict; | |
use warnings; | |
use URI; | |
use Web::Scraper; | |
use YAML; | |
my $staff = scraper { | |
process '//table[@width="565" and descendant::a[contains(@href,".asx")] ]', 'entries[]' => scraper { | |
process 'td.main_title2 > p', title => 'TEXT'; | |
process '//table[@width="553"]//td[@class="main_txt1"]', body => '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
From 3add1a3e2a041df91703adc8d32fe9bd4d570465 Mon Sep 17 00:00:00 2001 | |
From: mattn <[email protected]> | |
Date: Thu, 15 Jan 2009 17:50:08 +0900 | |
Subject: [PATCH] add cliplife. | |
--- | |
root/plugins/cliplife.jp/find_enclosures.pl | 16 ++++++++++++++++ | |
root/plugins/cliplife.jp/find_links.yaml | 2 ++ | |
2 files changed, 18 insertions(+), 0 deletions(-) | |
create mode 100644 root/plugins/cliplife.jp/find_enclosures.pl |
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
" append to syntax/hatena.vim | |
function SyntaxSuperPre() | |
let lnum = 1 | |
let lmax = line("$") | |
let mx = '^>|\(.*\)|$' | |
while lnum <= lmax | |
let curline = getline(lnum) | |
if curline =~ mx | |
let lang = substitute(curline, mx, '\1', '') | |
exec 'runtime! syntax/'.lang.'.vim' |
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
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <unistd.h> | |
#include <dirent.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
typedef struct entry { | |
char* path; |
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
50000got |
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
alert(new Date("2009-01-28T19:26:31+09:00".replace(/^(\d+)[\-\/](\d+)[\-\/](\d+)T(\d+:\d+:\d+)([+\-].*)/, function() { | |
var r = RegExp; | |
return new Date(new Date([r.$1, r.$2, r.$3].join('/') + ' ' + r.$4 + ' ' + r.$5).getTime() + | |
+ parseInt(r.$5.replace(/^([\+\-])(\d+):(\d+)$/, function() { | |
var r = RegExp; | |
return r.$1 + (Number(r.$2)*3600 + Number(r.$3)*60); | |
}))).toString() | |
})).toString()) |
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 Config::Pit; | |
use WWW::Mechanize; | |
my $file = shift or die("usage: $0 [file]"); | |
my $mech = WWW::Mechanize->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
package MyFilter; | |
use strict; | |
use warnings; | |
use Filter::Simple; | |
FILTER { s{ \$SIG\{INT\{ }{ \$SIG\{INT\} }x; }; | |
1; |