Skip to content

Instantly share code, notes, and snippets.

View greermurray's full-sized avatar

Murray W. Greer C. greermurray

View GitHub Profile
@drmalex07
drmalex07 / README-create-debian-startup-script.md
Last active September 29, 2023 11:42
An example of how to create a init.d script in Debian, using dependency booting. #debian #init.d #lsb-script #startup-script
@SchumacherFM
SchumacherFM / db.go
Created February 15, 2015 00:13
GoLang Database SQL: Selecting an unknown amount of columns from a query. Benchmark results in db_test.go
package main
import (
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
"log"
)
const (
@jg-l
jg-l / getRecentMedia.go
Last active May 5, 2020 02:58
Get Recent Media from Instagram
import (
"fmt"
"io/ioutil"
"net/http"
"github.com/tidwall/gjson"
)
type Media struct {
Link, Source string
}
@douglasmakey
douglasmakey / sender.go
Last active February 2, 2024 17:05
Golang - send an email with attachments.
package main
import (
"bytes"
"encoding/base64"
"fmt"
"io/ioutil"
"mime/multipart"
"net/smtp"
"os"
@alana-mullen
alana-mullen / ConnectivityExtension.kt
Created January 16, 2020 00:28
Android Kotlin extension to check network connectivity
import android.content.Context
import android.net.ConnectivityManager
import android.net.NetworkCapabilities
import android.os.Build
val Context.isConnected: Boolean
get() {
val connectivityManager = this.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
return when {
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M -> {