Skip to content

Instantly share code, notes, and snippets.

// Run in Grails context inside grails console
// Below will be helpful to create "application.groovy" from "application.yml" in Grails 3
// which will be an easy porting experiance from Grails 2.* to Grails 3
// In future, this can be added to a grails command and/or added to a Grails profile.
import org.springframework.beans.factory.config.YamlMapFactoryBean
import org.springframework.core.io.ClassPathResource
import org.springframework.core.io.Resource
YamlMapFactoryBean factory = new YamlMapFactoryBean()
@supsup
supsup / gist-build-armian-using-docker-centos-rhel7.sh
Created May 9, 2018 19:11 — forked from rfrht/gist-build-armian-using-docker-centos-rhel7.sh
Building a Tinkerboard Armbian Kernel in a RHEL / CentOS 7 using Docker
=== CONSOLE FALLBACK: SERIAL PORT, SINCE NO HDMI SUPPORT IS PROVIDED IN THIS BUILD ===
Tinkerboard Kernel console serial port: UART2.
Using: Raspberry Pi as a console client. Disable local console so it can be used by minicom:
# systemctl mask serial-getty@ttyAMA0.service
==PINOUTS==
RASPI: PIN 6 (GND, GREEN), PIN 8 (TX, WHITE), PIN 10 (RX, BLUE)
TINKERBOARD: ====== Uses UART2 and NOT UART0!!!!!!!! ======
PIN30 (GND, GREEN), PIN 32 (TX, BLUE), PIN 33 (RX, WHITE)
<%
String markDownServerPath = request.getServletPath().toString().replace(".gsp",".md");
String filepathBase = 'C:/sites/devnet_content/dpslate/source';
String markDownMachinePath = filepathBase + markDownServerPath;
def file = new File(markDownMachinePath);
if(file.exists()){
println markdown.renderHtml(['text' : file.text])
}else{
println "You need to make a file: markDownServerPath"