Skip to content

Instantly share code, notes, and snippets.

View ondrajz's full-sized avatar

Ondrej Fabry ondrajz

View GitHub Profile
package main
import (
"bytes"
"io/ioutil"
"log"
"net"
"os"
"golang.org/x/crypto/ssh"
@ondrajz
ondrajz / server-status.sh
Last active January 3, 2018 09:30
Server Status to Slack
#!/bin/bash
# ==================================================================
#
# server-status.sh
#
# Retrieves current status of the server and sends it to Slack.
#
# https://github.com/TrueFurby/f48cc2acb58370bd1109ec55c9820439
#
@inz
inz / emojis.md
Last active March 25, 2017 18:46
GitHub Emojis
@aprice
aprice / makefile
Last active January 8, 2023 16:53
Full base Golang makefile for developers and Jenkins. Handles installing tools, formatting, linting, cross-compilation, installation, and packaging for distribution.
# This file is intended as a starting point for a customized makefile for a Go project.
#
# Targets:
# all: Format, check, build, and test the code
# setup: Install build/test toolchain dependencies (e.g. gox)
# lint: Run linters against source code
# format: Format the source files
# build: Build the command(s) for target OS/arch combinations
# install: Install the command(s)
# clean: Clean the build/test artifacts
@sam-b-rose
sam-b-rose / ascii-emoji-cheat-sheet.md
Last active February 8, 2021 22:29
List of all supported ASCII emoji's supported by autocomplete-ascii-emoji package

Cheat Sheet

ʘ‿ʘ
innocent

ಠ_ಠ
disapproval

(╯°□°)╯︵ ┻━┻
table-flip
This utilizes blns to cram strings through the 'widen' gem.
The first line is the original string, the second, the 'widened' string, the third, the 'narrowened' string
Test strings
Scunthorpe General Hospital
Scunthorpe General Hospital
Scunthorpe General Hospital
$100% true

Turning Off Github Issues

My friend Michael Jackson turned off github issues on one of his smaller projects. It got me thinking...

Maintainers getting burned out is a problem. Not just for the users of a project but the mental health of the maintainer. It's a big deal for both parties. Consumers want great tools, maintainers want to create them, but maintainers don't want to be L1 tech support, that's why they

@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active April 26, 2024 19:09
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@harlow
harlow / golang_job_queue.md
Last active April 24, 2024 10:21
Job queues in Golang
@donatj
donatj / http.go
Last active September 12, 2018 19:34
Golang Basic Auth
package utils
import (
"net/http"
)
func BasicAuth(handler http.Handler, username, password string) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
if u, p, ok := r.BasicAuth(); !ok || !(u == username && p == password) {
w.Header().Set("WWW-Authenticate", "Basic realm=\"ZorkIrc\"")