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
def self.daemon | |
IO.popen("python /root/isk-daemon-0.6.2/isk-daemon.py 2>&1") { |io| | |
i = "" | |
thread = Thread.new { | |
while IO.select([io], nil, nil) do | |
i = io.gets | |
puts i | |
break if i.nil? | |
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
def x_put (blob) | |
self.permalink = UUID.random_create.to_s if self.permalink.blank? | |
imgs = Magick::Image.from_blob(blob) | |
first = imgs.first | |
case first.get_exif_by_entry("Orientation") && first["EXIF:Orientation"] | |
when "6" | |
first.rotate!(90) | |
first["EXIF:Orientation"] = "1" | |
when "3" | |
first.rotate!(180) |
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
# Typical way of handling the email in the controller | |
class UsersController < ApplicationController | |
def create | |
@user = User.new params[:user] | |
UserMailer.deliver_welcome(@user) if @user.save | |
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
=CRASH REPORT==== 12-Nov-2009::17:24:16 === | |
crasher: | |
initial call: gen:init_it/6 | |
pid: <0.22220.97> | |
registered_name: [] | |
exception exit: system_limit | |
in function gen_server2:terminate/6 | |
ancestors: [<0.22138.97>] | |
messages: [{'EXIT',<0.22137.97>,normal}] | |
links: [] |
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
=CRASH REPORT==== 31-Jan-2010::06:30:43 === | |
crasher: | |
initial call: gen:init_it/6 | |
pid: <0.6619.974> | |
registered_name: [] | |
exception exit: {{case_clause,{error,system_limit}}, | |
[{rabbit_queue_index,scatter_journal,4}, | |
{rabbit_queue_index,init,1}, | |
{rabbit_variable_queue,init,1}, | |
{rabbit_amqqueue_process,init,1}, |
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
=CRASH REPORT==== 31-Jan-2010::06:49:55 === | |
crasher: | |
initial call: ssl_connection:init/1 | |
pid: <0.11745.973> | |
registered_name: [] | |
exception exit: bad_info | |
in function gen_fsm:terminate/7 | |
ancestors: [ssl_connection_sup,ssl_sup,<0.180.0>] | |
messages: [] | |
links: [<0.188.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
# GravitronShiftr | |
# | |
# just a simple test of ShinyCocos2d | |
# i could get used to this | |
class DemoScene < Cocos2D::Scene | |
include Cocos2D | |
def initialize | |
@layer = Layer.new |
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
# GravitronShiftr | |
# | |
# just a simple test of ShinyCocos2d | |
class DemoScene < Cocos2D::Scene | |
include Cocos2D | |
def initialize | |
@layer = Layer.new | |
@map = TMXTiledMap.new("sewers.tmx") |
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
core file size (blocks, -c) unlimited | |
data seg size (kbytes, -d) unlimited | |
file size (blocks, -f) unlimited | |
max locked memory (kbytes, -l) unlimited | |
max memory size (kbytes, -m) unlimited | |
open files (-n) unlimited | |
pipe size (512 bytes, -p) 1 | |
stack size (kbytes, -s) 65532 | |
cpu time (seconds, -t) unlimited | |
max user processes (-u) 532 |
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
Processing InternalController#revision (for localhost at 2010-04-27 16:27:26) [GET] | |
Parameters: {"wang"=>"wang"} | |
Completed in 12ms (View: 1, DB: 2) | 200 OK [http://localhost/internal/revision?wang=%22wang%22] |
OlderNewer