Skip to content

Instantly share code, notes, and snippets.

View utf18's full-sized avatar
๐Ÿšš

Benjamin utf18

๐Ÿšš
  • Freelancer
  • Germany
View GitHub Profile
@utf18
utf18 / main.go
Created January 7, 2018 19:03 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
#!/bin/bash
# First line of the script is shebang which tells the system how to execute
# the script: http://en.wikipedia.org/wiki/Shebang_(Unix)
# As you already figured, comments start with #. Shebang is also a comment.
# Simple hello world example:
echo Hello world! # => Hello world!
# Each command starts on a new line, or after semicolon:
echo 'This is the first line'; echo 'This is the second line'
// Single line comment
/* Multi-
line comment */
// A package clause starts every source file.
// Main is a special name declaring an executable rather than a library.
package main
// Import declaration declares library packages referenced in this file.
import (
# Single line comments start with a number symbol.
""" Multiline strings can be written
using three "s, and are often used
as comments
"""
####################################################
# 1. Primitive Datatypes and Operators
####################################################
kubectl get secret --namespace default lumpy-jackal-grafana -o jsonpath="{.data.grafana-admin-password}" | base64 --decode ; echo
kubectl get secret --namespace default lumpy-jackal-grafana -o yaml
echo "YWRtaW4=" | base64 -D ; echo
{
"ignition": {
"version": "2.0.0",
"config": {}
},
"storage": {},
"systemd": {},
"networkd": {},
"passwd": {
"users": [
sudo lsof -PiTCP -sTCP:LISTEN
Package Manager
Cleanup Command
yum
yum clean all
dnf
dnf clean all
rvm
rvm cleanup all
gem
gem cleanup
@utf18
utf18 / delete-new-files
Created June 18, 2017 15:54
delete-files-newer-than
# finds and deletes files newer than 1 min
find . -type f -cmin -1 -delete
VBoxManage convertfromraw --format VDI [filename].img [filename].vdi