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
| #!/bin/env ruby | |
| url = 'www.gamespot.com/games.html?type=games&mode=all&sort=score&dlx_type=all&sortdir=asc&sortdir=asc&page=' | |
| re = /<td class="tac"><a href="[\d\w\/]*index.html">(\d\d?.\d)<\/a><\/td>/im | |
| # Init Scores | |
| scores = {} | |
| (0..10).each do |t| | |
| (0..9).each do |o| | |
| scores["#{t}.#{o}"] = 0 | |
| 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
| section: options | |
| screenSaverSync = true | |
| end | |
| section: screens | |
| jan: | |
| switchCorners = none | |
| switchCornerSize = 0 | |
| jan-note: | |
| switchCorners = none | |
| switchCornerSize = 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
| ActionController::Base.logger.info "[Base] Loading config/initializers/" + File.basename(__FILE__) | |
| class String | |
| def to_permalink | |
| text = self.dup | |
| replacements = { | |
| # replacement special character(s) to be replaced | |
| "A" => [ "À", "Á", "Â", "Ã", "Å"], | |
| "Ae" => [ "Ä", "Æ" ], | |
| "C" => [ "Ç" ], |
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
| class AddAttachmentsDataToWrapper < ActiveRecord::Migration | |
| def self.up | |
| add_column :wrappers, :data_file_name, :string | |
| add_column :wrappers, :data_content_type, :string | |
| add_column :wrappers, :data_file_size, :integer | |
| add_column :wrappers, :data_updated_at, :datetime | |
| end | |
| def self.down | |
| remove_column :wrappers, :data_file_name |
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
| cat > ~/.gemrc | |
| --- | |
| :benchmark: false | |
| :update_sources: true | |
| gem: --no-rdoc --no-ri | |
| :backtrace: false | |
| :bulk_threshold: 1000 | |
| :verbose: true | |
| :sources: | |
| - http://gems.rubyforge.org/ |
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
| --- Zend/zend.h 2007-09-05 00:16:02.000000000 +0200 | |
| +++ Zend/zend.h | |
| @@ -80,18 +80,7 @@ | |
| # include <dlfcn.h> | |
| #endif | |
| -#if HAVE_MACH_O_DYLD_H | |
| -#include <mach-o/dyld.h> | |
| - | |
| -/* MH_BUNDLE loading functions for Mac OS X / Darwin */ |
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 'socket' | |
| class SMTPSession | |
| @@timeout = 25 | |
| def initialize (session) | |
| @session = session | |
| puts "## SESSION STARTED ##" | |
| end | |
| def write (s) |
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 'rubygems' | |
| require 'nokogiri' | |
| doc = Nokogiri::XML.fragment(<<-eoxml) | |
| <bla> | |
| <bing/> | |
| <bong/> | |
| </bla> | |
| <blubb>asdasd</blubb> | |
| eoxml |
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 | |
| require "#{ENV['TM_SUPPORT_PATH']}/lib/exit_codes.rb" | |
| require "#{ENV['TM_SUPPORT_PATH']}/lib/ui.rb" | |
| require "rubygems" | |
| require 'active_support/inflector' | |
| current_word = ENV['TM_CURRENT_WORD'] || "" | |
| def gem_exists?(name) |
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
| function time_select(time_str) { | |
| time_str = time_str.match(/(\d+):(\d+)/) | |
| if(time_str) { | |
| var h = time_str[1] | |
| var m = time_str[2] | |
| } | |
| var buf = '<select class="time_h">' | |
| for (var i=0; i < 24; i++) { | |
| var is = i < 10 ? "0"+i : i; | |
| buf += '<option' + (i == h ? ' selected' : '' ) + '>' + is + '</option>' |
OlderNewer