Skip to content

Instantly share code, notes, and snippets.

@gomes
gomes / camelcasetosnake_case.go
Created August 15, 2018 15:21
Simple regex to convert camel case to snake_case in Go
package main
import (
"fmt"
"regexp"
"strings"
)
func main() {
re := regexp.MustCompile(`([a-z0-9])([A-Z])`)
@gomes
gomes / gist:7697353
Created November 28, 2013 19:55
Running Tomcat's startup.sh using Ansible's shell module
shell: setsid /bin/sh -i -c "{{ tomcat_path }}/bin/startup.sh" &> /tmp/null