Skip to content

Instantly share code, notes, and snippets.

@b-long
b-long / docker-compose.yml
Created August 31, 2021 20:19
Redis, docker-compose, hello world
version: "3.9"
services:
helloworld:
image: "redis:alpine"
command: /bin/echo 'Hello world'
@b-long
b-long / unattend.xml
Created February 14, 2017 21:27
CloudForms Sysprep example - Windows Server 2008 R2
<%
# Setting Variables
debug = false
ms_product_key = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
locale = "en-US"
registered_organization = "My Company"
registered_owner = "My Company"
# Change values if blank
evm[:hostname] = evm[:vm_target_hostname] if evm[:hostname].blank? # Use vm_target_hostname if hostname in the dialog was blank
<powershell>
Write-Host "This script is running in PowerShell `n"
Write-Host "The current PowerShell version is `n $PSVersionTable.PSVersion `n"
pwd > c:\test.log
dir >> c:\test.log
</powershell>
<script>
pwd > c:\test.log
dir >> c:\test.log
</script>
@b-long
b-long / experiment-5.yml
Created February 10, 2017 21:01
Experimental cloud-init file
#cloud-config
# Based on http://www.marcoberube.com/archives/272
# MiqProvisionAmazon_Web.yaml
# CloudForms - Cloud-Init Script for Apache Installation on EC2
# For troubleshooting check: /var/lib/cloud/instance/user-data.txt & /var/log/boot.log
<% # Set Global Variables
role = evm[:role]
role ||= evm[:ws_values][:role] rescue 'web'
instance_name = evm[:vm_target_name]
@b-long
b-long / RCurl to curl migration.md
Last active November 5, 2015 21:21
Result should be the same from both implementations

Original code

url <- c("https://www.r-project.org/","http://bioconductor.org/")
result <- lapply(url, function(f) {
          # TODO: Consider if we want this in the new function
          # message(basename(f))
          h <- RCurl::basicTextGatherer()
          ok <- RCurl::curlPerform(url=f,
                            nobody=TRUE, headerfunction=h$update)
          yy <- h$value()
@b-long
b-long / has_external_connection.sh
Created October 15, 2015 23:47 — forked from jimhester/has_external_connection.sh
Bash function to detect if an R command uses an external connection of anykind. Designed to be used with R CMD check
#!/bin/bash
# Bash function to detect if an R command uses an external connection of
# any kind. Designed to be used with R CMD check
function has_external_connection {
DIR=$(mktemp -d)
# Use a local repository so we don't have to make an external connection for
# `available.packages()`
mkdir -p $DIR/src/contrib
@b-long
b-long / InstallJDK8Ubuntu.md
Created October 8, 2015 01:03
Quick note on installing the Oracle Java 1.8 JDK in Ubuntu

Certainly not the first person to write this, but figured I'd write it down in my own gist.

To install the Oracle JDK 8 (1.8), do the following:

sudo add-apt-repository ppa:webupd8team/java
# You can't skip this step
sudo apt-get update
sudo apt-get install oracle-java8-installer
@b-long
b-long / Three-Node-LustreFS-Cluster-Quickstart.md
Last active August 29, 2015 14:27 — forked from joshuar/Three-Node-LustreFS-Cluster-Quickstart.md
Quick three-node Lustre set-up on CentOS 6