Skip to content

Instantly share code, notes, and snippets.

@zmackie
zmackie / devops.md
Created July 7, 2020 19:47
devops checklist
  • First of all, be sure to understand the importance of the cultural points: read more here The 15-point DevOps Check List
  • You should master *nix systems and have a good understanding of how Linux distributions work.
  • Pick one OS for your production set-up. No need to get master of every OS out there. It would make your job difficult down the line. Pick one and get a grip over it.
  • Be at ease with Terminal. You may have GUIs to manage your servers but you have to LOVE the terminal no matter what’s the case, it is faster, secure and honestly it is easier once you master it.
  • “man standing on brown field grass during daytime” by Fredrick Kearney Jr on Unsplash
  • How to get the CPU/system info (cat /proc/version, /proc/cpuinfo, uptime, et. al.)
  • How cron jobs works. Set cron jobs on specific days/time/month.
  • How to know what OS you are running on your machine (cat /etc/lsb-release)
  • Learn the difference between different *nix OSs and how to know what OS you are running on your machine (e.g. cat /etc/

Pick a programming language

Decision #: 1

Decision:

What programming language should I learn next?

Date:

@zmackie
zmackie / output.sh
Created March 12, 2020 15:14
output.sh
# LOCAL REBUILD
± zm |master → origin ✓| → pack build -p apps --builder cnbs/sample-builder:alpine zmackie/localtest
alpine: Pulling from cnbs/sample-builder
Digest: sha256:9e3cfea3f90fb4fbbe855a2cc9ce505087ae10d6805cfcb44bd67a4b72628641
Status: Image is up to date for cnbs/sample-builder:alpine
alpine: Pulling from cnbs/sample-stack-run
Digest: sha256:f611081e086fcc7f7b8b1eb3b9844f05a34f65dba40656b7bf0d31742964ebbc
Status: Image is up to date for cnbs/sample-stack-run:alpine
===> DETECTING
[detector] io.buildpacks.samples.hello-world 0.0.1
@zmackie
zmackie / buildpacks.md
Created January 2, 2020 14:27
Buildpacks project Overview

asda

func openbrowser(url string) {
var err error
switch runtime.GOOS {
case "linux":
err = exec.Command("xdg-open", url).Start()
case "windows":
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
case "darwin":
err = exec.Command("open", url).Start()
@zmackie
zmackie / gotchas.md
Created June 23, 2018 21:07
Various Gotchas i've been gotcha-ed by

Using jq for environement variable creation is nice, because you can have one blob with the value. Not: export $BLAH=$(cat whatever.json | jq .key) Do: export $BLAH=$(cat whatever.json | jq -r .key) # you must add the -r flag for raw mode.

FWIW: I didn't produce the content present here. I've just copy-pasted it from somewhere over the Internet, but I cannot remember exactly the original source. I was also not able to find the author's name, so I cannot give him/her the proper credit.


Effective Engineer - Notes

What's an Effective Engineer?

@zmackie
zmackie / package.json
Created November 18, 2017 14:29 — forked from oroce/package.json
run eslint only on changed (*.js files) files using pre-commit
{
"scripts": {
"eslint": "LIST=`git diff-index --name-only HEAD | grep .*\\.js | grep -v json`; if [ \"$LIST\" ]; then eslint $LIST; fi"
},
"devDependencies": {
"pre-commit": "0.0.7",
"eslint": "~0.5.1"
},
"pre-commit": [
"eslint"
@zmackie
zmackie / client.go
Created November 18, 2017 14:29 — forked from elico/client.go
golang tcp client connection alive check
package main
import (
"fmt"
"io"
"net"
"time"
)
func main() {