Skip to content

Instantly share code, notes, and snippets.

View dmenne's full-sized avatar

Dieter Menne dmenne

View GitHub Profile
@mike-lawrence
mike-lawrence / pulse.Rproj
Last active December 28, 2017 17:17
Inference on amplitude & noise in simple periodic pulse model Raw
Version: 1.0
RestoreWorkspace: No
SaveWorkspace: No
AlwaysSaveHistory: No
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8
@OliverJAsh
OliverJAsh / foo.ts
Last active July 29, 2023 18:16
Records and dictionaries in TypeScript
/*
In JavaScript, objects can be used to serve various purposes.
To maximise our usage of the type system, we should assign different types to our objects depending
on the desired purpose.
In this blog post I will clarify two common purposes for objects known as records and dictionaries
(aka maps), and how they can both be used with regards to the type system.
@tbadams45
tbadams45 / uiOutput-in-modules.R
Last active June 28, 2023 18:25
How to use renderUI in shiny modules. Main takeaway: session$ns("id"). This works in nested modules, too. See the section on session$ns in the documentation for more information: http://shiny.rstudio.com/reference/shiny/latest/session.html
library(shiny)
library(dplyr)
library(ggplot2)
innerModUI <- function(id) {
ns <- NS(id)
fluidPage(fluidRow(
uiOutput(ns("inner_slider")),
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
@walkerjeffd
walkerjeffd / Synology-Diskstation-Git.md
Last active May 19, 2024 21:30
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@trestletech
trestletech / server.R
Last active February 2, 2022 09:47
A Shiny app combining the use of dplyr and SQLite. The goal is to demonstrate a full-fledged, database-backed user authorization framework in Shiny.
library(shiny)
library(dplyr)
library(lubridate)
# Load libraries and functions needed to create SQLite databases.
library(RSQLite)
library(RSQLite.extfuns)
saveSQLite <- function(data, name){
path <- dplyr:::db_location(filename=paste0(name, ".sqlite"))
@jcheng5
jcheng5 / global.R
Last active December 20, 2021 14:32 — forked from dempseydata/global.R
###############################################
##
## Attempt no 2 at building a shiny web app
## for AB Testing use - using global.R
##
## global.R - loading and defining variables for the global environment
##
###############################################
# Pallette used in some charts as a general indicator color for better or worse that the control group