This file contains hidden or 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 'uri' | |
uri = URI.parse(ARGV[0]) | |
http = Net::HTTP.new(uri.host, uri.port) | |
http.set_debug_output $stderr | |
http.start{|http| | |
req = Net::HTTP::Get.new(uri.path + (uri.query.empty? ? "" : "?" + uri.query)) | |
res = http.request(req) | |
puts res.body |
This file contains hidden or 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 'aws-sdk' | |
ACCESS_KEY_ID ="your_access_key" | |
SECRET_ACCESS_KEY="your_secret_access_key" | |
AWS.config( | |
:access_key_id => ACCESS_KEY_ID, | |
:secret_access_key => SECRET_ACCESS_KEY | |
) |
This file contains hidden or 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 'twitter' | |
CONSUMER_KEY = 'CONSUMER_KEY' | |
CONSUMER_SECRET = 'CONSUMER_SECRET' | |
OAUTH_TOKEN = 'OAUTH_TOKEN' | |
OAUTH_TOKEN_SECRET = 'OAUTH_TOKEN_SECRET' | |
API_KEY = 'VOICETEXT_WEB_API_KEY' | |
begin | |
twcli = Twitter::REST::Client.new do |config| |
This file contains hidden or 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/ruby | |
require 'rubygems' | |
require 'uri' | |
require 'net/http' | |
require 'json' | |
require 'date' | |
require 'twitter' | |
begin |
This file contains hidden or 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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Parameters" : { | |
"KeyName" : { | |
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance", | |
"Type" : "String" | |
}, | |
"RecipeURL" : { | |
"Description" : "The location of the recipe tarball", |
This file contains hidden or 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/ruby -Ku | |
require 'rubygems' | |
require 'gruff' | |
require 'csv' | |
day = Hash.new | |
weight = Array.new | |
fat = Array.new | |
i=0 |
This file contains hidden or 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/ruby | |
require "rubygems" | |
require 'oauth' | |
require 'rubytter' | |
require 'rss/1.0' | |
require 'open-uri' | |
# 設定ファイルをロードする |
This file contains hidden or 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/ruby | |
require "rubygems" | |
require 'oauth' | |
require 'rubytter' | |
require 'rss/2.0' | |
require 'open-uri' | |
# 設定ファイルをロードする |
This file contains hidden or 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/ruby -Ku | |
require 'rubygems' | |
require 'oauth' | |
require 'rubytter' | |
require 'open-uri' | |
require 'nokogiri' | |
#require 'rexml/document' |
This file contains hidden or 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/ruby | |
require 'pcap' | |
def cap_data(dev,filstr,count) | |
# [device],[snaplen],[promisc?],[read timeout(ms)] | |
pcaplet = Pcap::Capture.open_live(dev,1460,true,1000) | |
access = Pcap::Filter.new(filstr,pcaplet) | |
pcaplet.setfilter(access) |