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
lastDigit x = x `mod` 10 | |
dropLastDigit x = x `div` 10 | |
--let toDigits x =if x < 10 | |
-- then 0 | |
-- else (toDigits (dropLastDigit x)) ++ [lastDigit x] | |
toDigits :: Integer -> [Integer] | |
toDigits x |
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
# TODO: verify route with flash team | |
get "certificates/:action/:id/(:points)(/:date)", :controller => :certificates, :as => :certificates | |
get '/diag_menu_scores_student/:user_id' => 'diag_menu_scores_student#index', :as => :diag_menu_scores_student | |
put '/change_arena_level' => 'arena_levels#update', :as => :change_arena_level | |
post '/account_data_store' => 'account_data_stores#create' | |
post '/teacher_data_store' => 'teacher_data_stores#create' | |
post 'add_pre_reading_keyword' => 'pre_reading_exercises#add_keyword', :as => :add_pre_reading_keyword | |
delete 'remove_pre_reading_keyword' => 'pre_reading_exercises#remove_keyword', :as => :remove_pre_reading_keyword |
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
#!upstart | |
# | |
description "chrome" | |
setuid deploy #run as deploy user | |
start on (net-device-up | |
and local-filesystems | |
and runlevel [2345]) | |
stop on runlevel [016] |
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
source "/home/foobar/.rvm/scripts/rvm" | |
if [ $1 == 'task1' ]; then | |
/usr/bin/env /home/foobar/.rvm/rubies/ruby-1.9.2-p0/bin/ruby /var/www/rails_app/script/rails runner -e production "Tasker.task1" | |
exit 1; | |
fi | |
if [ $1 == 'task2' ]; then | |
/usr/bin/env /home/foobar/.rvm/rubies/ruby-1.9.2-p0/bin/ruby /var/www/rails_app/script/rails runner -e production "Tasker.task2" | |
exit 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
# m h dom mon dow command | |
#task1 | |
0,30 05-07 * * * /home/foobar/script task1 | |
0,10,20,30,40,50 08-18 * * * /home/foobar/script task1 | |
0,30 19-21 * * * /home/foobar/script task1 | |
#task2 | |
0,30 19-21 * * * /home/foobar/script task2 | |
#clean up the logs # once a week every saturday, at 00:00 (midnight) |
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
yasi8h@yas-mbp:fusionweb$ git st | |
# On branch yasith | |
# Changed but not updated: | |
# (use "git add <file>..." to update what will be committed) | |
# (use "git checkout -- <file>..." to discard changes in working directory) | |
# | |
# modified: config/environment.rb | |
# modified: config/environments/development.rb | |
# modified: config/initializers/devise.rb | |
# |
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
# | |
# Release | |
# | |
git checkout develop | |
git-smart-pull | |
git checkout master | |
git-smart-pull | |
git flow release start 2015.02.23.1 | |
# | |
# bump version |
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
if condition1 | |
if condition2 | |
do1 | |
else | |
do2 | |
end | |
else | |
if condition2 | |
do3 | |
else |
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
$ bundle list | |
Gems included by the bundle: | |
* actionmailer (4.0.0) | |
* actionpack (4.0.0) | |
* activemodel (4.0.0) | |
* activerecord (4.0.0) | |
* activerecord-deprecated_finders (1.0.3) | |
* activesupport (4.0.0) | |
* arel (4.0.0) | |
* atomic (1.1.13) |
OlderNewer