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
# Start from the RStudio Workbench base image | |
FROM rstudio/rstudio-workbench:jammy | |
# Set repository options globally for all R sessions | |
RUN echo 'options(repos = c( CRAN = "https://packagemanager.posit.co/cran/__linux__/jammy/latest", CRAN_20240401 = "https://packagemanager.posit.co/cran/__linux__/jammy/2024-04-01", BioCsoft = "https://bioconductor.org/packages/3.13/bioc", BioCann = "https://bioconductor.org/packages/3.13/data/annotation", BioCexp = "https://bioconductor.org/packages/3.13/data/experiment", BioCworkflows = "https://bioconductor.org/packages/3.13/workflows" ))' > /opt/R/4.4.1/lib/R/etc/Rprofile.site | |
# Install pak for efficient dependency resolution | |
RUN /opt/R/4.4.1/bin/Rscript -e 'install.packages("pak", repos = "https://packagemanager.posit.co/cran/__linux__/jammy/latest")' | |
# Install required R packages using pak |
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
# Use SSH key if on Connect, otherwise use managed credentials | |
if (Sys.getenv("RSTUDIO_PRODUCT") == "CONNECT"){ | |
# grab ssh key from environment variable and cache as tempfile | |
cached_key <- tempfile() | |
readr::write_file(openssl::base64_decode(Sys.getenv("SNOWFLAKE_SSH_KEY")), file = cached_key) | |
# The ambient credential feature in odbc::snowflake() causes unexpected overwrites, so we'll use the base Snowflake driver. | |
con <- dbConnect( | |
odbc::odbc(), | |
driver = "Snowflake", |
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
#!/bin/bash | |
# LDAP Connection details | |
LDAP_SERVER="ldap://cofer.me" | |
BIND_DN="CN=ldap-bind,CN=Users,DC=cofer,DC=me" | |
PASSWORD="password" | |
BASE_DN="DC=cofer,DC=me" | |
# Output CSV file | |
OUTPUT_FILE="ad-users.csv" |
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
# Load required libraries | |
library(jsonlite) | |
# Path to the renv.lock file | |
file_path <- "renv.lock" | |
# Read and parse the JSON content from the file | |
renv_data <- fromJSON(file_path) | |
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
#!/bin/bash | |
# Check if URL is passed as an argument | |
if [ $# -eq 0 ]; then | |
echo "Error: Please provide a URL as an argument." | |
exit 1 | |
fi | |
# Set the URL | |
URL=$1 |
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
#Placeholder to change the name of the gist |
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
# Load necessary libraries | |
library(ggplot2) | |
library(shiny) | |
# Load Old Faithful geyser data | |
data <- faithful | |
# Define UI | |
ui <- fluidPage( | |
titlePanel("Old Faithful Geyser Data"), |
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
-- Create all objects and audit table | |
create TABLE t_history ( | |
id serial, | |
tstamp Timestamp DEFAULT now(), | |
schemaname text, | |
tabname text, | |
operation text, | |
who text DEFAULT current_user, | |
new_val jsonb, |
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
#Posit Linux Aliases |