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 | |
require "rubygems" | |
require "id3lib" | |
File.instance_eval do | |
def mp3?(path) | |
File.extname(path).downcase == '.mp3' | |
end | |
end |
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
var DateHelper = { | |
// Takes the format of "Jan 15, 2007 15:45:00 GMT" and converts it to a relative time | |
// Ruby strftime: %b %d, %Y %H:%M:%S GMT | |
time_ago_in_words_with_parsing: function(from) { | |
var date = new Date; | |
date.setTime(Date.parse(from)); | |
return this.time_ago_in_words(date); | |
}, | |
time_ago_in_words: function(from) { |
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
#!ruby | |
#-- | |
# Copyright 2009 Wilker Lucio <wilkerlucio@gmail.com> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
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
(function($) { | |
$.fn.watermark = function() { | |
return this.each(function() { | |
this._watermark_base = this.value; | |
$(this).focus(function() { | |
if (this._watermark_base == this.value) { | |
this.value = ''; | |
} | |
}); |
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
/* | |
* Copyright 2009 Wilker Lucio <wilkerlucio@gmail.com> | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
/* | |
* Simple Page Load Trigger | |
* | |
* Copyright 2009 Wilker Lucio <wilkerlucio@gmail.com> | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
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
# ignoring files | |
file ".gitignore", <<-TXT | |
log/*.log | |
tmp/**/* | |
db/*.sqlite3 | |
.DS_Store | |
Thumbs.db | |
TXT | |
# download pt-br i18n and configure environment |
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
-- Example list of processes to ignore: {"xGestures"} or {"xGestures", "OtherApp", ...} | |
property processesToIgnore : {} | |
-- Get the size of the Display(s), only useful if there is one display | |
-- otherwise it will grab the total size of both displays | |
tell application "Finder" | |
set _b to bounds of window of desktop | |
set screen_width to item 3 of _b | |
set screen_height to item 4 of _b | |
end tell |
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
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. | |
# It is recommended to regenerate this file in the future when you upgrade to a | |
# newer version of cucumber-rails. Consider adding your own code to a new file | |
# instead of editing this one. Cucumber will automatically load all features/**/*.rb | |
# files. | |
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths")) | |
# Commonly used webrat steps |
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 | |
# | |
# Put this script in your PATH and download from onemanga.com like this: | |
# onemanga_downloader.rb Bleach [chapter number] | |
# | |
# You will find the downloaded chapters under $HOME/Documents/OneManga/Bleach | |
# | |
# If you run this script without arguments, it will check your local manga downloads | |
# and check if there are any new chapters | |
require 'rubygems' |
OlderNewer