Run 5 times, with one second delay between calls
t1 = new Timer(500, function(){
console.log(this.count);
if (this.count >= 5) {
this.stop();
}
});
class Fixnum | |
# Convert a number in seconds to minutes (mm:ss) | |
def to_minutes | |
Time.at(self).gmtime.strftime('%M:%S') | |
end | |
end |
By Klaus Wuestefeld | |
1) Torne-se excelente. | |
Seja realmente bom em alguma coisa. Não fique só choramingando ou | |
querendo progredir às custas dos outros. Não pense que, porque você sentou 4 | |
anos numa faculdade ouvindo um professor falar sobre software, você | |
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo | |
aula. Ele pratica. Instrumentistas geniais não aprendem a tocar tendo | |
aula. Eles praticam. Pratique. Chegue em casa depois do trabalho e da |
#installing | |
sudo aptitude install apache2 -y | |
sudo aptitude install php5 -y | |
sudo aptitude install libapache2-mod-php5 -y | |
sudo aptitude install mysql-server | |
#checking Apache and MySQL | |
sudo netstat -tap | grep apache | |
sudo netstat -tap | grep mysql |
def invert(code) | |
"#{code[1].chr}#{code[0].chr}" | |
end | |
def encrypt(zipcode) | |
codes = { | |
"00" => "AL", | |
"01" => "UG", | |
"10" => "CN", | |
"11" => "X8", |
a = [1, 2] | |
if a.each do |i| | |
puts i | |
end.empty? | |
puts "Empty" | |
end |
Tutorial by @alobato: | |
Initial Stack for Ubuntu 10.04 LTS (Lucid) - Rails with Nginx | |
https://gist.github.com/1942842 | |
Wget 1.12 | |
Curl 7.19.7 | |
Git 1.7.0.4 | |
Ruby 1.9.3p125 | |
RubyGems 1.8.17 |
upstream tunnel { | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80; | |
server_name dev.codeplane.com br.dev.codeplane.com; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; |
This is a list of HAFAS API endpoints, all with different data versions, API versions, output formats and URL configurations. Help me complete this list!
ActiveAdmin.register Milestone do | |
scope :all, :default => true | |
scope :global | |
scope :user_specific | |
index do | |
column :title | |
column :description | |
column :required_litres | |
column :is_active |