Skip to content

Instantly share code, notes, and snippets.

View daattali's full-sized avatar

Dean Attali daattali

View GitHub Profile
@daattali
daattali / accordion_reprex
Last active June 20, 2019 21:11 — forked from geebioso/accordion_reprex
This code creates deletable dynamic accordions that load a modal when they are created. The modal is triggering too many times after an accordion is deleted and then reloaded.
makeReactiveTrigger <- function() {
rv <- shiny::reactiveValues(a = 0)
list(
depend = function() {
rv$a
},
trigger = function() {
rv$a <- shiny::isolate(rv$a + 1)
}
)
@daattali
daattali / server.R
Last active January 14, 2021 04:42 — forked from withr/server.R
Encrypt password with md5 for Shiny-app.
library(shiny)
library(datasets)
Logged = FALSE;
PASSWORD <- data.frame(Brukernavn = "withr", Passord = "25d55ad283aa400af464c76d713c07ad")
# Define server logic required to summarize and view the selected dataset
shinyServer(function(input, output) {
source("www/Login.R", local = TRUE)
observe({