Skip to content

Instantly share code, notes, and snippets.

View mattn's full-sized avatar
🍛
I love curry 🍛

mattn mattn

🍛
I love curry 🍛
View GitHub Profile
#!/usr/bin/perl
use strict;
use warnings;
use Web::Scraper;
use URI;
use YAML;
my $airlines_accident_scraper = scraper {
let foo = "post from gist-vim"
@echo off
if not "%SSH_AGENT_PID%" == "" goto end
for /f "eol=; tokens=1,2 delims==;" %%1 in ('ssh-agent.exe') do (
if "%%1" == "SSH_AUTH_SOCK" set SSH_AUTH_SOCK=%%2
if "%%1" == "SSH_AGENT_PID" set SSH_AGENT_PID=%%2
)
ssh-add
end
@mattn
mattn / gui.rb
Created November 10, 2008 08:27
require 'ditz'
require 'pathname'
config = begin
Ditz::Config.from ".ditz-config"
rescue SystemCallError => e
Ditz::Config.new
end
issue_dir = Pathname.new(config.issue_dir || '.ditz')
project_root = Ditz::find_dir_containing(issue_dir + Ditz::FileStorage::PROJECT_FN)
#!/usr/bin/python
# -*- coding: utf-8 -*-
class Hoge:
def __init__(self):
print u"ほげ"
hoge = Hoge()
use strict;
use warnings;
use POSIX;
if (my $pid = fork()) {
sleep 3;
kill TERM => $pid;
waitpid( $pid, 0 );
} elsif ($pid == 0) {
sleep 10;
#!perl
use strict;
use warnings;
use Config::Pit;
use Getopt::Long;
use WWW::Mechanize;
use Perl6::Say;
my $conf = pit_get("vim.com", require => {
"username" => "your username on vim.org", # NOTE: do not edit this line
@mattn
mattn / release.pl
Created January 5, 2009 08:33 — forked from mattn/release.pl
#!perl
use strict;
use warnings;
use Config::Pit;
use Getopt::Long;
use WWW::Mechanize;
use Perl6::Say;
my $conf = pit_get("vim.com", require => {
"username" => "your username on vim.org", # NOTE: do not edit this line
#include <iostream>
static const int a = (
std::cout << "foo" << std::endl,
1);
int main(int argc, char** argv) {
std::cout << "bar" << std::endl;
return 0;
}
@mattn
mattn / imkayac.pl
Created January 7, 2009 01:20
post to im.kayac.com
#!/usr/bin/perl
use strict;
use warnings;
use Config::Pit;
use Digest::SHA1 qw(sha1_hex);
use Encode;
use Getopt::Long;
use JSON;
use LWP::UserAgent;