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 'rubygems' | |
require 'twitter' | |
Twitter::Search.new('#onecushion').each do |r| | |
puts "id: " + r.id.to_s | |
puts "user: " + r.from_user | |
puts "user_id: "+r.from_user_id.to_s | |
puts "image_url: "+r.profile_image_url | |
puts "message: "+r.text | |
puts "" |
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 'rubygems' | |
require 'tumblr' | |
require 'hpricot' | |
config = { | |
:email => 'name@example.com', | |
:password => 'secret', | |
:name => 'your_tumblr_name' | |
} |
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 ruby | |
puts "hi, tumblr" |
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
using System; | |
using System.IO; | |
using System.Text; | |
using Amazon; | |
using Amazon.S3; | |
using Amazon.S3.Model; | |
namespace AWSUploadTest | |
{ |
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
using System; | |
using Microsoft.SqlServer.Management.Smo; | |
namespace LogTruncate | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Server server = new Server(@"dbserver\instancename"); |
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
setup.exe /q /ACTION=install /FEATURES=SQL,Tools /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS="Administrators" /SQLSVCACCOUNT="Network Service" /AGTSVCACCOUNT="Network Service" |
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 ruby | |
# assumes apache log file looks like this (all we care about is the final field): | |
# LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D" custom | |
require 'optparse' | |
options = {} | |
options[:time] = 1 | |
OptionParser.new do |opts| |
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 ruby | |
# | |
# simple rrd trending of http access logs | |
# Usage example: | |
# trends.rb /var/log/messages | |
require "rubygems" | |
require "eventmachine" | |
require "eventmachine-tail" | |
require "rrd" |
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
# The story: you have all sorts of logs, | |
# and you want to get an idea how often certain | |
# events occur each minute | |
# Perhaps you just want to know how many HTTP transactions occurred. | |
# Maybe you are worried about unauthorized access attempts. | |
# How about how many customers are flogging your api endpoint? | |
# You need to see the outliers. Grepping through log files | |
# in the midst of a crisis is very hard to do and quite unproductive. |
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
describe FizzBuzz, "#calculate" do | |
it "returns 'Fizz' for all multiples of 3" | |
it "returns 'Buzz' for all multiples of 5" | |
it "returns 'FizzBuzz' for all multiples of 3 and 5" | |
it "returns the passed number if not a multiple of 3 or 5" | |
end |
OlderNewer