Skip to content

Instantly share code, notes, and snippets.

b-long b-long

Block or report user

Report or block b-long

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View user-data-2.xml
<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>
View user-data-1.xml
<script>
pwd > c:\test.log
dir >> c:\test.log
</script>
@b-long
b-long / unattend.xml
Created Feb 14, 2017
CloudForms Sysprep example - Windows Server 2008 R2
View unattend.xml
<%
# 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
@b-long
b-long / experiment-5.yml
Created Feb 10, 2017
Experimental cloud-init file
View experiment-5.yml
#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 Nov 5, 2015
Result should be the same from both implementations
View RCurl to curl migration.md

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 Oct 15, 2015 — 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
View has_external_connection.sh
#!/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 Oct 8, 2015
Quick note on installing the Oracle Java 1.8 JDK in Ubuntu
View InstallJDK8Ubuntu.md

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
View Three-Node-LustreFS-Cluster-Quickstart.md
You can’t perform that action at this time.