Cron jobs in Ruby
Providencia uma forma fácil de criar e agendar jobs no cron
Através do arquivo (`config/schedule.rb`) são descritas tasks, que serão agendadas no cron
As tarefas são executadas através do Rails runner command (`rails runner`)
{ | |
"auto_complete": true, | |
"auto_complete_selector": "source - comment", | |
"auto_indent": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"detect_indentation": true, | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 15, |
x = [1,2,3] | |
x.send :[]=,0,2 | |
x[0] + x.[](1) + x.send(:[],2) |
public Boolean haveInstructions(Integer currentIndex) { | |
try { | |
instructions.get(currentIndex); | |
return Boolean.TRUE; | |
} catch(IndexOutOfBoundsException e) { | |
return Boolean.FALSE; | |
} | |
} |
def up_stock(quantity = nil) | |
#... | |
render nothing: true | |
end |
<% flash.each do |name, message| %> | |
<div class="alert alert-<%= name == :notice ? "success" : "error" %>"> | |
<a class="close" data-dismiss="alert" href="#">×</a> | |
<%= message %> | |
</div> | |
<% end %> |
#And change "peer" to "md5" on the line concerning postgres :
local all postgres peer md5
[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Name=Eclipse SDK | |
GenericName=Java editor | |
Exec=/opt/eclipse/eclipse | |
Terminal=false | |
MimeType=text/plain; | |
Icon=/opt/eclipse/icon.xpm | |
Categories=Development; |
GNU Octave is a high-level interpreted language, primarily intended for numerical computations. It provides capabilities for the numerical solution of linear and nonlinear problems, and for performing other numerical experiments.
[GNU Octave](http://www.gnu.org/software/octave/)
# apt-get install octave
ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host |