- do not improve Rails skills, instead:
- OO
- Ruby
- Design
- ...
This file contains hidden or 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
# Rake task to launch multiple Resque workers in development/production with simple management included | |
require 'resque/tasks' # Require Resque tasks | |
namespace :workers do | |
# = $ rake workers:start | |
# | |
# Launch multiple Resque workers with the Rails environment loaded, | |
# so they have access to your models, etc. |
This file contains hidden or 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
#/bin/bash | |
year=2011 | |
function header { | |
begin='Tätigkeiten ' | |
case $1 in | |
1) month='Januar ';; | |
2) month='Februar ';; | |
3) month='März ';; |
This file contains hidden or 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
$('div[data-path^="spec"]').parent('div').hide(); |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"io" | |
"io/ioutil" | |
"math" | |
"math/rand" | |
"os" | |
"strings" |
This file contains hidden or 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
mokbook:ethon mike$ rspec | |
Starting 1 test servers | |
Waiting for servers to start... | |
Servers are up! | |
Ethon::Easy::Form | |
.new | |
defines finalizer | |
assigns attribute to @params | |
#first |
This file contains hidden or 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
(defun m (x i) (= 0 (mod x i))) | |
(defun fibu (x) | |
(cond | |
((m x 15) "FizzBuzz") | |
((m x 3) "Fizz") | |
((m x 5) "Buzz"))) | |
(loop for i from 1 to 100 do | |
(princ (or (fibu i) i)) |
This file contains hidden or 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
#!/bin/bash | |
# | |
# This script will add a user "devteam" with password "devteam" and allow him to | |
# view your screen. | |
dscl . -delete /Users/devteam &> /dev/null | |
maxid=$(dscl . -list /Users UniqueID | awk '{print $2}' | sort -ug | tail -1) | |
newid=$((maxid+1)) |
This file contains hidden or 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 BahamaMama < RTanque::Bot::Brain | |
NAME = 'Bahama Mama' | |
include RTanque::Bot::BrainHelper | |
FULL_ANGLE = Math::PI * 2.0 | |
HALF_ANGLE = Math::PI | |
EIGHTH_ANGLE = Math::PI / 4.0 | |
QUARTER_ANGLE = Math::PI / 2.0 | |
ONE_DEGREE = FULL_ANGLE / 360.0 | |
FULL_RANGE = (0..FULL_ANGLE) |
This file contains hidden or 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
" markdown.vim | |
" Markdown preview using RDiscount ruby gem. | |
" Put this file into .vim/ftplugin | |
command! -nargs=0 MarkdownPreview call MarkdownRenderBufferToPreview() | |
noremap <buffer> <Leader>rp :MarkdownPreview<CR> | |
setlocal ignorecase | |
setlocal wrap |