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 'net/ftp' | |
@filename = File.expand_path(ARGV[0]) | |
ftp = Net::FTP.connect("HOST", "PORT") | |
ftp.login "USERNAME", "PASSWORD" | |
ftp.chdir("FOLDER") | |
ftp.putbinaryfile(@filename) # or ftp.puttextfile(@filename) | |
ftp.close |
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
$> yum install gcc gcc-c++ autoconf automake | |
Loaded plugins: rhnplugin | |
Excluding Packages in global exclude list | |
Finished | |
Setting up Install Process | |
Resolving Dependencies | |
--> Running transaction check | |
---> Package autoconf.noarch 0:2.59-12 set to be updated | |
--> Processing Dependency: imake for package: autoconf | |
--> Processing Dependency: m4 for package: autoconf |
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
[Thu Jan 28 17:54:33 2010] [error] [client ip] proxy: error reading status line from remote server localhost | |
[Thu Jan 28 17:54:33 2010] [error] [client ip] proxy: Error reading from remote server returned by /action |
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
irb(main):002:0> (Date.today+1).strftime("%Y-%m-%d") | |
=> "2010-02-24" | |
irb(main):003:0> (Date.today +1).strftime("%Y-%m-%d") | |
=> "2010-02-23" | |
irb(main):004:0> (Date.today + 1).strftime("%Y-%m-%d") | |
=> "2010-02-24" | |
irb(main):005:0> (Date.today+ 1).strftime("%Y-%m-%d") | |
=> "2010-02-24" |
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
class SuperModel < Sequel::Model | |
def display(column) | |
# This method would use @some_kind_of_configuration_here to display the value. | |
end | |
end | |
class User < SuperModel | |
@some_kind_of_configuration_here = { | |
:column => "Column" | |
} |
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
@ids = [1,2,3] | |
string = %q( | |
<ul> | |
<?r @ids.each do |i| ?> | |
<li>#{i}</li> | |
<?r end ?> | |
</ul> | |
) |
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
[2010-08-20 10:54:36] INFO Restoring "%04%08%7B%07:%0Avalueo:%1ARamaze::Session::Hash%07:%0D@sessiono:%14Ramaze::Session%09:%0D@droppedF:%10@session_id%22E6f45947e79f097123cf3049bae945cfb090f2023eb6d25d88cc21af403b33086:%0D@current@%06:%0B@flasho:%1BRamaze::Session::Flash%06;%07@%07:%0A@hash%7B%0A:%09user%22%22exploid%22%1BVoloThrottleController%7B%0C:%0Bactivei%06:%0Bpausedi%07:%0Bserveri%00:%0Csegmenti%00:%0Fstart_dateu:%09Date=%04%08[%08o:%0DRational%07:%11@denominatori%07:%0F@numeratori%03%CB%EEJi%00i%03%19%15%23:%0Dend_dateu;%15=%04%08[%08o:%0DRational%07:%11@denominatori%07:%0F@numeratori%03%09%EFJi%00i%03%19%15%23:%0Bsourcei%00:%13FLASH_PREVIOUS%7B%00:%0AadminT:%0Cuser_id%22%061:%0Cexpires0" (flags 5) | |
This is the result of the last Restoring before the error message. I have no idea what do to with that though :/ |
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 (c) 2008 Michael Fellinger m.fellinger@gmail.com | |
# All files in this distribution are subject to the terms of the Ruby license. | |
require 'ramaze/trinity' | |
module Ramaze | |
# A module used by the Templates and the Controllers | |
# it provides both Ramaze::Trinity (request/response/session) | |
# and also a helper method, look below for more information about it |
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
Gemset 'blog-jekyll' does not exist, rvm gemset create 'blog-jekyll' first. | |
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux] |
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
It seems that the content script of a page-mod continues to execute even when a tab is closed/detached. | |
As you can see in this example output, I opened two tabs. Every second the content script outputs the tab_id received and the current time. I only closed the second tab. I have two problems: | |
1 - I don't understand why the "Detached a tab" message appeared twice while only one tab was closed. Anybody can explain this behavior or confirm that it's a bug? | |
2 - The two intervals that were started in the content script continued to run. I expected that the content script would stop executing completely when a tab was closed/detached. How do I make sure that the content script stops executing completely when a tab is closed/detached? |