Skip to content

Instantly share code, notes, and snippets.

Avatar

Murray W. Greer C. greermurray

View GitHub Profile
@greermurray
greermurray / render_number.go
Created May 5, 2020 — forked from gorhill/render_number.go
A Go function to render a number to a string based on the following user-specified criteria: thousands separator, decimal separator, decimal precision. I didn't feel it was worth to publish a library just for this piece of code, hence the snippet. Feel free to reuse as you wish.
View render_number.go
/*
Author: https://github.com/gorhill
Source: https://gist.github.com/gorhill/5285193
A Go function to render a number to a string based on
the following user-specified criteria:
* thousands separator
* decimal separator
@greermurray
greermurray / README-init.d.md
Last active May 3, 2020 — forked from drmalex07/README-create-debian-startup-script.md
Script init.d de ejempo para iniciar programas o scripts al arrancar en Debian
View README-init.d.md

README

Script init.d de ejempo para iniciar programas o scripts al arrancar en Debian

Pasos para ejecutar programas o script al arranque del SO (Debian)

  • Copiar script en la carpeta /etc/init.d/
  • Darle permiso de ejecución: sudo chmod +x /etc/init.d/foo.sh
  • Activarlo: sudo update-rc.d foo.sh defaults
  • Desactivarlo: sudo update-rc.d -f foo.sh remove
@greermurray
greermurray / db.go
Created May 1, 2020 — forked from SchumacherFM/db.go
GoLang Database SQL: Selecting an unknown amount of columns from a query. Benchmark results in db_test.go
View db.go
package main
import (
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
"log"
)
const (
You can’t perform that action at this time.