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/env ruby | |
# A simple script to get a list of nicknames used by a series of hosts from the UnrealIRCd connects log. | |
require 'set' | |
CONNECTS_LOG_PATH = File.expand_path('~/UnrealIRCd/logs/connects.log') | |
hosts = ARGV | |
if hosts.size == 0 | |
puts('Get a list of nicknames used by a series of hosts from the UnrealIRCd connects log.') | |
abort('Usage: get_nicks_by_hosts host1 [host2] [..] [hostn]') | |
end |
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/env ruby | |
# get_details_by_identified_nicks.rb | |
# A script to get a list of hosts and details from the Anope services logs based on successful nickserv identifies. | |
require 'set' | |
SERVICES_LOGS_PATH = File.expand_path("~/services/data/logs/services.log*") | |
nicks = ARGV | |
if nicks.size == 0 | |
puts('Get a list of hosts and details from the Anope services logs based on successful nickserv identifies.') |
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/env ruby | |
# get_details_by_nick_registrations.rb | |
# Gets a list of hosts and other details from Anope services logs based on successful nickserv registrations. | |
require 'set' | |
require 'yaml' | |
SERVICES_LOGS_PATH = File.expand_path("~/services/data/logs/services.log*") | |
nicks = ARGV | |
if nicks.size == 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/env ruby | |
# get_hosts_by_identified_nicks.rb | |
# Gets a list of hosts from the Anope services logs based on successful nickserv identifies. | |
require 'set' | |
SERVICES_LOGS_PATH = File.expand_path("~/services/data/logs/services.log*") | |
DEBUG = false | |
if ARGV.size > 0 | |
DEBUG = true if ARGV.include?('--debug') | |
nicks = ARGV |
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/env ruby | |
# get_identified_nicks_by_hosts.rb | |
# Gets a list of nicks from the Anope services logs that have successfully been identified for by the given hosts. | |
require 'set' | |
SERVICES_LOGS_PATH = "~/services/data/logs/services.log*" | |
if ARGV.size > 0 | |
hosts = ARGV | |
else |
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
# Install kicker on osx: sudo gem install kicker --source http://gemcutter.org\ | |
# | |
# Place a `.kick' file with this code in the root of your project, which contains the file to watch. | |
# Then start running kicker from the project root: $ kicker | |
FILE_TO_WATCH = 'mockup-1.psd' | |
counter = nil | |
if File.exist?('output') |
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/env ruby | |
# Retrieves all National Geographic Photo-contest wallpapers from 2008 and 2009 | |
# Original scripts from: http://www.webupd8.org/2009/11/automatically-download-all-wallpapers.html | |
require 'net/http' | |
class WallpaperRetriever | |
attr_reader :destination_folder,:urls | |
def initialize(destination="~/Pictures/Wallpapers/NationalGeographic/") |
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 'yaml' | |
class Array | |
def random | |
self[Kernel.rand(size)] | |
end | |
end | |
class Hash | |
def random |
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
<?php | |
/* Random Image Generator | |
* Base code & Inspiration by : Maciek "Tularis" Sokolewicz | |
* ReWritten and enhanced by : Filip H.F. "FiXato" Slagter | |
* Contact : [email protected] | |
* Uses privately adapted version of Directory Listing Script found at : http://php.net/readdir (created by [email protected] on 31-Jan-2003 04:16) | |
*/ | |
if(!function_exists('image_type_to_mime_type')) { //check if function exists... | |
//Alternate version of Image_Type_To_Mime_Type()-function, if that function is absent |
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/env ruby | |
# Fetches weather info from Google Weather API and Weather Underground API. | |
# Syntax: | |
# ./weather_grabber.rb [location] | |
# | |
# (c) 2010 Filip H.F. "FiXato" Slagter | |
# Licensed under Creative Commons Attribution-Share Alike 3.0 Unported License, http://creativecommons.org/licenses/by-sa/3.0/ | |
['rubygems','nokogiri','open-uri','yaml', 'iconv'].each {|lib| require lib} | |
if ARGV.size > 0 | |
location = ARGV.join(" ") |