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
doctype html | |
html | |
head | |
title Slim Examples | |
meta name="keywords" content="template language" | |
meta name="author" content=author | |
javascript: | |
alert('Slim supports embedded javascript!') | |
body |
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
# Use this setup block to configure all options available in SimpleForm. | |
SimpleForm.setup do |config| | |
config.wrappers :bootstrap, :tag => 'div', :class => 'form-group', :error_class => 'has-error' do |b| | |
b.use :html5 | |
b.use :placeholder | |
b.use :label | |
b.use :input, :wrap_with => { :tag => 'div', :class => 'controls' } | |
b.use :error, :wrap_with => { :tag => 'span', :class => 'help-block' } | |
b.use :hint, :wrap_with => { :tag => 'p', :class => 'help-block' } | |
end |
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
# OSX | |
sudo /Library/StartupItems/VirtualBox/VirtualBox restart |
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
class Pessoa | |
def initialize | |
@nome = nome | |
@email = email | |
@senha = senha | |
end | |
def nome | |
@nome |
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
Template.timeline.helpers({ | |
posts: function(){ | |
return Post.find({}); | |
} | |
}); |
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
config.generators do |g| | |
g.assets false | |
g.helper false | |
g.test_framework nil | |
end |
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
[class*="title-"]{ | |
color:#444; | |
} |
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
// Declarando váriaveis em JavaScript | |
// String | |
var nome = "Diego" | |
// Number (independente se é float ou Interito em js é do tipo number) | |
var idade = 30 | |
var valor = 150.90 | |
// Boolean(Retorna true ou false) |
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
.controller('OrdersCtrl', function($scope, $http) { | |
$http.get('https://api.blinktrade.com/api/v1/BRL/orderbook?crypto_currency=BTC').then(function(resp) { | |
console.log('Success', resp); | |
// For JSON responses, resp.data contains the result | |
}, function(err) { | |
console.error('ERR', err); | |
// err.status will contain the status code | |
}) | |
}) |
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
*, *:before, *:after { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} |
OlderNewer