// 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')));
});
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
<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> |
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
/* 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: '<Anterior', | |
nextText: 'Próximo>', | |
currentText: 'Hoje', | |
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho', | |
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], |
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
#youtube videos | |
def youtube_video_tag(id, html_options = {}) | |
video_tag "http://www.youtube.com/embed/#{id}" | |
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
#!/bin/sh | |
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.24-osx10.9-x86_64.tar.gz | |
tar xfvz mysql-5.6* | |
echo "stopping mamp" | |
sudo /Applications/MAMP/bin/stop.sh | |
sudo killall httpd mysqld | |
echo "creating backup" |
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
Some setup you must do manually if you haven't yet: | |
1. Ensure you have defined default url options in your environments files. Here | |
is an example of default_url_options appropriate for a development environment | |
in config/environments/development.rb: | |
config.action_mailer.default_url_options = { :host => 'localhost:3000' } | |
In production, :host should be set to the actual host of your application. |
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
# Adicione o código dentro do module em config/application.rb | |
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
<% if flash[:notice].present? %> | |
<div class="alert alert-success" role="alert"> | |
<a class="close" data-dismiss="alert">×</a> | |
<%= flash[:notice] %> | |
</div> | |
<% end %> | |
<% if flash[:alert].present? %> | |
<div class="alert alert-error" role="alert"> | |
<a class="close" data-dismiss="alert">×</a> |
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
# encoding: utf-8 | |
require 'csv' | |
class AssociadosController < ApplicationController | |
authorize_resource | |
def index | |
if params['filtro'].present? |
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
getList(successCallback){ | |
let storage = new Storage(SqlStorage); | |
storage.query("SELECT * FROM accounts").then((data) => { | |
let list = []; | |
for (var i = 0; i < data.res.rows.length; i++) { | |
let item {}; | |
item.id = data.res.rows.item(i).id; |