Heroku is a simple way to publish your Rails app, and a powerful platform that will allow it to scale. In this episode, Jay McGavren gets you started with your first Heroku app.
- You WANT Rails to fail locally if a gem isn't in your Gemfile
<?php | |
$url = $_POST["url"]; | |
function main(){ | |
global $url; | |
$hash = get_hash($url); | |
echo $url; | |
echo "</br>"; | |
echo $hash; |
# -*- coding: utf-8 -*- | |
""" | |
Spyder Editor | |
This is a temporary script file. | |
""" | |
class Node: |
# -*- coding: utf-8 -*- | |
""" | |
Spyder Editor | |
This is a temporary script file. | |
""" | |
class Node: | |
"""Node é um container""" | |
<?php | |
/* | |
* Define constantes para acesso ao banco de dados | |
* | |
* DB_HOST = endereço do host | |
* | |
* DB_USER = nome do usuário | |
* | |
* DB_PASSWORD = senha do usuário |
#encoding: utf-8 | |
module LocalizedDateLiquidFilter | |
MESES = [nil] + %w(Janeiro Fevereiro Março Abril Maio Junho Julho Agosto Setembro Outubro Novembro Dezembro) | |
def localized_date(date) | |
if date.class == String | |
date = Time.parse(date) | |
end |
$sudo git init --bare my_project.git | |
Initialized empty Git repository in /opt/git/my_project.git/ | |
$sudo chown -R git:git my_project.git/ | |
git clone user@git.example.com:/opt/git/my_project.git |
Heroku is a simple way to publish your Rails app, and a powerful platform that will allow it to scale. In this episode, Jay McGavren gets you started with your first Heroku app.
colors = ['Red', 'Blue', 'Green', 'Yellow', 'Black'] | |
states = ['Andhra', 'Karnataka', 'TamilNadu', 'Kerala'] | |
neighbors = {} | |
neighbors['Andhra'] = ['Karnataka', 'TamilNadu'] | |
neighbors['Karnataka'] = ['Andhra', 'TamilNadu', 'Kerala'] | |
neighbors['TamilNadu'] = ['Andhra', 'Karnataka', 'Kerala'] | |
neighbors['Kerala'] = ['Karnataka', 'TamilNadu'] |
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -xvzf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125/ | |
./configure --prefix=/usr/local | |
make | |
make install |
require 'irb/ext/save-history' | |
#History configuration | |
IRB.conf[:SAVE_HISTORY] = 1000 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" |