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
# coding: utf-8 | |
require "faraday" | |
require "faraday_middleware" | |
require "json" | |
require "pp" | |
module GetGist | |
BASE_URL = "https://api.github.com" |
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
# coding: utf-8 | |
require "twitter" | |
require "json" | |
require "pp" | |
module TwitList | |
def self.start | |
Twitter.list_timeline("t_ramu", "tech").each do |tw| | |
p tw.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
@echo off | |
TortoiseProc.exe /command:update /path:"path/to/file" /closeonend: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
# coding: utf-8 | |
require "fileutils" | |
module CreateTmpl | |
extend self | |
def run(argv) | |
@name = argv | |
@capitalize = argv.capitalize |
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 'openssl' | |
module OpenSSL | |
module SSL | |
remove_const :VERIFY_PEER | |
end | |
end | |
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE |
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 Amon2::Lite; | |
use JSON; | |
use Data::Dumper; | |
__PACKAGE__->load_plugins('DBI'); |
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
- (void)tweet_refresh:(int)type { | |
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES; | |
NSURL *url = [NSURL URLWithString:@"http://twitter.com/statuses/public_timeline.json"]; | |
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; | |
[request setDelegate:self]; | |
[request startAsynchronous]; | |
} | |
- (void)requestFinished:(ASIHTTPRequest *)request { | |
[mtArray_ removeAllObjects]; |
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
NSURL *url = [NSURL URLWithString:@"http://twitter.com/statuses/public_timeline.json"]; | |
NSURLRequest *req = [NSURLRequest requestWithURL:url]; | |
NSError *error = nil; | |
NSData *res = [NSURLConnection sendSynchronousRequest:req returningResponse:nil error:&error]; | |
//NSData -> NSString | |
NSString *json_string = [[NSString alloc] initWithData:res encoding:NSUTF8StringEncoding]; | |
NSArray *json = [json_string JSONValue]; | |
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 URI::Escape; | |
use LWP::Simple; | |
use Data::Dumper; | |
my $id = shift || die "Usage: $0 [video_id]"; |
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 XML::Simple; | |
use LWP::UserAgent; | |
my $ua = LWP::UserAgent->new; | |
my $res = $ua->get('http://weather.livedoor.com/forecast/rss/13/63.xml'); | |
die $res->status_line unless $res->is_success; |