Skip to content

Instantly share code, notes, and snippets.

View aleDsz's full-sized avatar
💜
Learning Rust and Elixir Socket TCP

Alexandre de Souza aleDsz

💜
Learning Rust and Elixir Socket TCP
View GitHub Profile
@aleDsz
aleDsz / app.R
Created October 4, 2017 05:04
Simple Shiny Application
library("shiny")
ui <- bootstrapPage(title = "Simple Shiny Application",
div(class = "container",
div(class = "jumbotron",
tags$h1("Bootstrap Tutorial"),
tags$p("Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile-first projects on the web.")
)
)
)
@aleDsz
aleDsz / app.R
Created October 4, 2017 05:15
Simple Shiny Application with external javascript file
library("shiny")
ui <- bootstrapPage(title = "Simple Shiny Application",
tags$head(tags$script(src = "https://cdnjs.cloudflare.com/ajax/libs/jquery.maskedinput/1.4.1/jquery.maskedinput.js")),
tags$head(tags$script(HTML("$(document).ready(function() { $('#texto').mask('99/99/9999', { autoclear: false }); });"))),
div(class = "container",
div(class = "jumbotron",
tags$h1("Bootstrap Tutorial"),
tags$p("Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile-first projects on the web."),
@aleDsz
aleDsz / class.R
Last active June 5, 2018 07:48
Generics em R - Exemplo 1
library ("methods")
setRefClass(
Class = "className",
fields = list (
property1 = "numeric",
property2 = "character",
property3 = "logical",
property4 = "Date"
@aleDsz
aleDsz / orm.R
Last active June 5, 2018 07:48
Generics em R - Exemplo 2
library ("methods")
# Classe
setRefClass("contacts",
fields = list (
id = "numeric",
first_name = "character",
last_name = "character",
age = "numeric",
email = "character"
@aleDsz
aleDsz / orm_2.R
Last active June 5, 2018 07:48
Generics em R - Exemplo 3
library ("methods")
# Levando em conta que carregamos a classe `contacts` na memória, seria simples utilizar a classe a seguir:
setRefClass("contactsController",
methods = list (
findAll = function (params = list ()) {
Contacts = new("contacts")
fieldNames <- names((Contacts$getClass())@fieldClasses)
className <- as.character((Contacts$getClass())@className)
@aleDsz
aleDsz / vscode_extensions_2019-07-14.txt
Created July 14, 2019 05:42
VSC Extensions (2019-07-14)
code --install-extension abusaidm.html-snippets
code --install-extension actboy168.lua-debug
code --install-extension alefragnani.delphi-pack
code --install-extension alefragnani.delphi-themes
code --install-extension alefragnani.numbered-bookmarks
code --install-extension alefragnani.pascal
code --install-extension alefragnani.pascal-formatter
code --install-extension attilabuti.vscode-mjml
code --install-extension bogdansalyp.hotline-vs
code --install-extension christian-kohler.npm-intellisense
@aleDsz
aleDsz / exercicio.alg
Created August 9, 2019 04:20
Exercício do AleMonja
algoritmo "Exercício do AleMonja"
var
contador : Inteiro
inicio
contador <- 1
enquanto (contador <= 100) faca
se (contador mod 3 = 0) e (contador mod 5 = 0) entao
escreval("AleMonja")
senao
@aleDsz
aleDsz / case.ex
Last active September 25, 2022 19:54
Elixir
case Modulo.funcao() do
{:ok, %User{role: "admin"} = user} ->
user |> faca_algo_com_admin()
{:ok, %User{role: "moderator"} = user} ->
user |> faca_algo_com_moderator()
{:ok, %User{role: "user"} = user} ->
user |> faca_algo_com_user()
@aleDsz
aleDsz / archlinux.md
Last active February 17, 2022 22:46
Instalar ArchLinux (quando não compartilha o mesmo bootloader)

Formatar

Formate seu device /dev/sda usando 4 partições:

  1. sda1: EFI -> 512M
  2. sda2: SWAP -> 8G
  3. sda3: (Linux root x86-64) / -> 100G (ou mais)
  4. sda4: (Linux root x86-64) /home -> o resto
cfdisk /dev/sda
@aleDsz
aleDsz / arch_customization.md
Last active February 17, 2022 22:39
Customize your Arch with KDE Plasma

Yay

Install the yay package manager to your Archlinux:

mkdir ~/aur
cd ~/aur
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si