Skip to content

Instantly share code, notes, and snippets.

View Senhordim's full-sized avatar
🏠
Working from home

Diego Collares Senhordim

🏠
Working from home
View GitHub Profile
@Senhordim
Senhordim / pessoa.rb
Last active August 29, 2015 13:58
getter setter ruby
class Pessoa
def initialize
@nome = nome
@email = email
@senha = senha
end
def nome
@nome
@Senhordim
Senhordim / timeline.js
Created July 14, 2014 14:38
Order ou Sort ?
Template.timeline.helpers({
posts: function(){
return Post.find({});
}
});
@Senhordim
Senhordim / gist:4b2fdbff08b2de53100e
Created July 30, 2014 18:44
Scaffold mais limpo
config.generators do |g|
g.assets false
g.helper false
g.test_framework nil
end
@Senhordim
Senhordim / racks.css
Created September 27, 2014 21:53
Selecionar todas as classes que começa com title-
[class*="title-"]{
color:#444;
}
@Senhordim
Senhordim / variaveis
Last active August 29, 2015 14:10
Declarando váriaveis em JavaScript
// 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)
.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
})
})
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
<div class="container">
<div class="row">
<div class="col-sm-6 col-md-4 col-md-offset-4">
<h1 class="text-center login-title">Sign in to continue to Bootsnipp</h1>
<div class="account-wall">
<img class="profile-img" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=120"
alt="">
<form class="form-signin">
<input type="text" class="form-control" placeholder="Email" required autofocus>
<input type="password" class="form-control" placeholder="Password" required>
// Delete confirmation modals
$('#delete-confirm').on('show', function() {
  var $submit = $(this).find('.btn-danger'),
      href = $submit.attr('href');
  $submit.attr('href', href.replace('pony', $(this).data('id')));
});
@Senhordim
Senhordim / datepicker-pt-BR.js
Created July 3, 2015 21:34
Datepicker pt-BR
/* Brazilian initialisation for the jQuery UI date picker plugin. */
/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
$(function($){
$.datepicker.regional['pt-BR'] = {
closeText: 'Fechar',
prevText: '&#x3c;Anterior',
nextText: 'Pr&oacute;ximo&#x3e;',
currentText: 'Hoje',
monthNames: ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho',
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],