Skip to content

Instantly share code, notes, and snippets.

View asssis's full-sized avatar

Assis Junior Siebra Barbosa asssis

View GitHub Profile
@asssis
asssis / Instalar Rails
Last active March 17, 2024 17:40
Instalar Rails
# 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
gem 'kaminari'
rails generate kaminari:views bootstrap4
@asssis
asssis / install rails
Last active August 9, 2023 15:40 — forked from alexishida/rbenv-ruby-rails-install.sh
Install rbenv, ruby and rails (executar como root)
#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
@asssis
asssis / Cabeçalho e Rodapé
Created November 27, 2018 15:57
Cabeçalho e Rodapé
<!DOCTYPE html>
<html>
<head>``
<style>
body {
background-color: #CCC;
margin:48px 0px 0px 64px;
}
div#header {
position:fixed;
comandos rails
# habilitar a pasta public do production
config.public_file_server.enabled = true
# Thread
Thread.new do
end
sudo npm install -g swagger
swagger project edit
@asssis
asssis / opencv python
Last active January 20, 2019 02:23
instalar o open cv
# 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
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){
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>"
$.ajax({
type: 'get',
url: '/intranet/notificacao/salvar_notificacao',
data: {
editor: editor,
},
dataType: 'json',
success: function (json) {