Skip to content

Instantly share code, notes, and snippets.

@dstroot
dstroot / handlers.go
Last active Sep 6, 2021 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View handlers.go
package main
import (
"io"
"net/http"
"sync/atomic"
)
func index() http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
View gist:bd37a123c02fecffbe629bf98a8391df
0x00 0 STOP
0x01 3 ADD
0x02 5 MUL
0x03 3 SUB
0x04 5 DIV
0x05 5 SDIV
0x06 5 MOD
0x07 5 SMOD
0x08 8 ADDMOD
0x09 8 MULMOD
@naveensrinivasan
naveensrinivasan / gh-dl-release
Created May 1, 2017 — forked from maxim/gh-dl-release
Download assets from private Github releases
View gh-dl-release
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@carnal0wnage
carnal0wnage / DevOOPS: Attacks And Defenses For DevOps Toolchains Talk Links
Last active Nov 5, 2020
Links from Chris Gates/Ken Johnson DevOOPS RSA 17 presentation
View DevOOPS: Attacks And Defenses For DevOps Toolchains Talk Links
@eloo
eloo / node_exporter.default
Last active May 21, 2021
Init.d script for prometheus node exporter
View node_exporter.default
# Set the command-line arguments to pass to the server.
ARGS='-web.listen-address=:9100 -collector.diskstats.ignored-devices="^(ram|loop|fd)\\d+$"'
# Prometheus-node-exporter supports the following options:
# -collector.diskstats.ignored-devices="^(ram|loop|fd|(h|s|v|xv)d[a-z])\\d+$": Regexp of devices to ignore for diskstats.
# -collector.filesystem.ignored-mount-points="^/(sys|proc|dev)($|/)": Regexp of mount points to ignore for filesystem collector.
# -collector.ipvs.procfs="/proc": procfs mountpoint.
# -collector.megacli.command="megacli": Command to run megacli.
# -collector.ntp.server="": NTP server to use for ntp collector.
# -collector.textfile.directory="": Directory to read text files with metrics from.
@mgoodness
mgoodness / k8s-svc-annotations.md
Last active Oct 19, 2021
AWS ELB-related annotations for Kubernetes Services (as of v1.12.0)
View k8s-svc-annotations.md

AWS Service annotations

  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)
View github-wiki-how-to.md

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: git@github.com:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?

@naveensrinivasan
naveensrinivasan / test
Created Dec 6, 2015
Gist from LinqPad
View test
Test file
@naveensrinivasan
naveensrinivasan / FilesSnapshot.xml
Created Dec 6, 2015
Gist created with unicode characters
View FilesSnapshot.xml
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\applicationcompatibilitytoolkit\applicationcompatibilitytoolkit.nupkg" checksum="2A62F5DA567C00D30BEE5EDB0CBF1D09" />
<file path="C:\ProgramData\chocolatey\lib\applicationcompatibilitytoolkit\tools\chocolateyInstall.ps1" checksum="D7F8382EE4831301DD86A7CB49AEEA82" />
<file path="C:\ProgramData\chocolatey\lib\applicationcompatibilitytoolkit\tools\chocolateyUninstall.ps1" checksum="FF19EF6FDEE3A1CB53603FD52DA0538D" />
</files>
</fileSnapshot>