This file contains hidden or 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
| const int pin_verm = 10; | |
| const int pin_verd = 9; | |
| const int pin_azul = 8; | |
| void setup() { } | |
| void loop() { | |
| analogWrite(pin_azul, 0); | |
| for (int verm=0; verm <= 255; verm++){ | |
| analogWrite(pin_verm, verm); |
This file contains hidden or 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
| const int pin_verm = 10; | |
| const int pin_verd = 9; | |
| const int pin_azul = 8; | |
| void setup() { } | |
| void loop() { | |
| analogWrite(pin_azul, 0); | |
| analogWrite(pin_verm, 255); | |
| delay(1000); |
This file contains hidden or 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
| # MUDAR PROJETO SEM MUDAR A URL | |
| slug = 'abono-salarial-calendario-2023-caixa-inicia-pagamento-em-15-de-fevereiro-bras237833' | |
| mc = MainContent.find_by_slug(slug) # 60553 | |
| mp = MainProject.find_by(code: 'PCXA') | |
| mc.update(main_project: mp, code: nil, slug: nil) | |
| mc.update(slug: slug) | |
| # ----------------------------------------------------------------------- | |
| # codigo do duplicado (código do projeto + últimos dois digitos do ano) |
This file contains hidden or 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
| # ADMIN | |
| gem 'devise' | |
| gem 'gretel' | |
| gem 'ransack' | |
| gem 'redactor-rails', '~> 0.4.5' | |
| gem 'simple_form' | |
| gem 'kaminari' | |
| gem 'friendly_id', '~> 5.1.0' | |
| # Uploader |
This file contains hidden or 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
| { | |
| "data": [ | |
| { | |
| "id": "36", | |
| "type": "final-sound", | |
| "attributes": { | |
| "id": 36, | |
| "final-sound-url": "http://res.cloudinary.com/dus0qvb2b/video/upload/UBAuTqhV78r6w2HuhtTUC8Kd", | |
| "title": "teste" | |
| }, |
This file contains hidden or 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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html lang="pt_br"> | |
| <head> | |
| <title>{% if content.html_title and content.html_title != '' %}{{ content.html_title }}{% else %}{{ content.body.subject }}{% endif %}</title> | |
| <meta content="{% if content.html_title and content.html_title != '' %}{{ content.html_title }}{% else %}{{ content.body.subject }}{% endif %}" property="og:title"> | |
| <meta content="{% if content.html_title and content.html_title != '' %}{{ content.html_title }}{% else %}{{ content.body.subject }}{% endif %}" name="twitter:title"> | |
| <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> | |
| <style media="screen" type="text/css">@import url('https://fonts.googleapis.com/css?family=Raleway:500,600'); | |
| body { | |
| background-color: #f2f2f2; |
This file contains hidden or 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 gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.4/bin/pg_config |
This file contains hidden or 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
| tables = [] | |
| ActiveRecord::Base.connection.tables.each do |t| | |
| count = ActiveRecord::Base.connection.exec_query("select count(*) from #{t}").rows[0][0] | |
| tables << [t, count.to_i] | |
| end | |
| tables.sort_by { |t| t[1] }.reverse! |
This file contains hidden or 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
| # --------------------------------------------- | |
| # EMULATE IONIC IN SPECIFIC VERSION | |
| ionic emulate ios --target="iPhone-6" | |
| # Valid values for "--target" (case sensitive): | |
| # iPhone-4s | |
| # iPhone-5 | |
| # iPhone-5s | |
| # iPhone-6-Plus | |
| # iPhone-6 |
This file contains hidden or 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
| import javax.swing.JFrame; | |
| import javax.swing.JOptionPane; | |
| public class TestaExcluirArquivo { | |
| public static void main(String[] args){ | |
| JFrame janela = new JFrame(); | |
| janela.setExtendedState(JFrame.MAXIMIZED_BOTH); | |
| janela.setVisible(true); | |
| int opcao = JOptionPane.showConfirmDialog(null,"Deseja continuar?", "Confirmação", JOptionPane.YES_NO_OPTION); | |
| if(opcao == JOptionPane.YES_OPTION){ |