Skip to content

Instantly share code, notes, and snippets.

View nicknezis's full-sized avatar

Nicholas Nezis nicknezis

  • Systolic, INC.
  • Baltimore, MD
View GitHub Profile
@minrk
minrk / minikube-bootstrap.sh
Last active March 12, 2020 02:02
bootstrap single node kubernetes with minikube (no vm)
set -x
wget -O /usr/local/bin/rmate https://raw.github.com/aurora/rmate/master/rmate
chmod a+x /usr/local/bin/rmate
apt -y update
apt -y dist-upgrade
apt -y install docker.io
which minikube || (curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && mv minikube /usr/local/bin/)
@martinhynar
martinhynar / zookeeper.service
Created June 2, 2017 10:56
ZooKeeper SystemD Service Unit File
[Unit]
Description=ZooKeeper Service
Documentation=http://zookeeper.apache.org
Requires=network.target
After=network.target
[Service]
Type=forking
User=zookeeper
Group=zookeeper
@OleksandrKucherenko
OleksandrKucherenko / version-up.sh
Last active May 2, 2024 13:04
Calculate Next Suitable Version Tag for Your Git based project
#!/usr/bin/env bash
# shellcheck disable=SC2155
## Copyright (C) 2017, Oleksandr Kucherenko
## Last revisit: 2023-09-30
## Version: 2.0.2
## License: MIT
## Fix: 2023-10-01, prefix for initial INIT_VERSION was not applied
## Fix: 2023-10-01, correct extraction of latest tag that match version pattern
## Added: 2023-09-30, @mrares prefix modification implemented
<template>
<form change.delegate="changeCount = changeCount + 1"
input.delegate="incrementInputCount($event.target)">
<p>
This form has changed ${changeCount} times.
The input event has fired ${inputCount} times.
</p>
<input type="text" placeholder="type something...">
<input type="text" placeholder="type something...">
<input type="text" placeholder="type something...">
@TheHippo
TheHippo / Makefile
Created March 31, 2016 22:32
Golang Makefile example
OUT := binariy-name
PKG := gitlab.com/group/project
VERSION := $(shell git describe --always --long --dirty)
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/)
all: run
server:
go build -i -v -o ${OUT} -ldflags="-X main.version=${VERSION}" ${PKG}
@derekcollison
derekcollison / gist:4616831fc476e5f2117e
Created December 3, 2015 18:03
NATS Performance with 16 publishers
~/Development/go/src/github.com/nats-io/nats/examples> ./nats-bench -np 16 -n 100000 foo ok
Starting benchmark
msgs=16X100000, pubs=16, subs=0
#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
@denji
denji / golang-tls.md
Last active April 29, 2024 03:39 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@tristanfisher
tristanfisher / Ansible-Vault how-to.md
Last active April 3, 2024 13:55
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

Working with ansible-vault


I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

import android.content.Context;
import android.util.AttributeSet;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.Scroller;
/**
* @author androidseb
@kwmt
kwmt / Castle.xml
Last active November 9, 2021 01:16 — forked from bemasher/Castle.xml
<?xml version="1.0" encoding="UTF-8" ?>
<Data>
<Series>
<id>83462</id>
<Actors>|Nathan Fillion|Stana Katic|Molly C. Quinn|Jon Huertas|Seamus Dever|Tamala Jones|Susan Sullivan|Ruben Santiago-Hudson|Monet Mazur|</Actors>
<Airs_DayOfWeek>Monday</Airs_DayOfWeek>
<Airs_Time>10:00 PM</Airs_Time>
<ContentRating>TV-PG</ContentRating>
<FirstAired>2009-03-09</FirstAired>
<Genre>|Drama|</Genre>