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
# PARA INSTALAR FAVOR COPIE A PARTE | |
* copie o arquivo #INSTALAR COLE EM UM ARQUIVO com o nome install.sh | |
* Dê a permição com chmod +777 | |
* Rode o camando no terminal sudo ./install | |
#ATUALIZAR RUBY | |
cd /usr/local/rbenv | |
git reset --hard | |
git pull origin master |
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
gem 'kaminari' | |
rails generate kaminari:views bootstrap4 |
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
#ATUALIZAR RUBY | |
cd /usr/local/rbenv | |
git reset --hard | |
git pull origin master | |
cd ~/.rbenv/plugins/ruby-build | |
git reset --hard | |
git pull origin master | |
# - Listando versoes existentes |
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>`` | |
<style> | |
body { | |
background-color: #CCC; | |
margin:48px 0px 0px 64px; | |
} | |
div#header { | |
position:fixed; |
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
comandos rails | |
# habilitar a pasta public do production | |
config.public_file_server.enabled = true | |
# Thread | |
Thread.new do | |
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
sudo npm install -g swagger | |
swagger project edit |
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
# instalar o python | |
# instalar o pip | |
-linux python2 => sudo apt install python-pip | |
-linux python3 => sudo apt install python3-pip | |
# atualizar o pip | |
- pip install --upgrade pip | |
- py [version] -m pip install opencv-python | |
- pip install opencv-python |
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
function json_to_table(json) | |
{ | |
type = jQuery.type(json); | |
if(jQuery.type(json) == "array") { | |
table = "<table>"; | |
table += "<tr>"; | |
table += "<thead>" | |
$.each(json[0], function(key, value){ |
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
help_aplication | |
module ApplicationHelper | |
def flash_message | |
messages = "" | |
[:success, :warning, :danger].each {|type| | |
if flash[type] | |
if type == :success | |
messages = "<script type='text/javascript'> swal('Sucesso!', '#{flash[:success]}', 'success') </script>" | |
elsif type == :warning | |
messages = "<script type='text/javascript'> swal('Atenção!', '#{flash[:warning]}', 'warning') </script>" |
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
$.ajax({ | |
type: 'get', | |
url: '/intranet/notificacao/salvar_notificacao', | |
data: { | |
editor: editor, | |
}, | |
dataType: 'json', | |
success: function (json) { | |
OlderNewer