Skip to content

Instantly share code, notes, and snippets.

View v5tech's full-sized avatar
🎯
Focusing

v5tech

🎯
Focusing
  • Xi'an China
  • 17:24 (UTC +08:00)
View GitHub Profile
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active June 17, 2024 15:13
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@danielepolencic
danielepolencic / README.md
Last active May 20, 2024 18:07
Create 3 nodes Kubernetes cluster locally with Vagrant

3 Virtual Machines Kubernetes cluster

Dependencies

You should install VirtualBox and Vagrant before you start.

Creating the cluster

You should create a Vagrantfile in an empty directory with the following content:

@superseb
superseb / cleanup.sh
Last active June 19, 2023 10:03
Cleanup host added as custom to Rancher 2.0
#!/bin/sh
# OUTDATED: please refer to the link below for the latest version:
# https://github.com/rancherlabs/support-tools/blob/master/extended-rancher-2-cleanup/extended-cleanup-rancher2.sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
@magnetikonline
magnetikonline / README.md
Last active April 30, 2024 15:48
Bash getopt long options with values usage example.

Bash getopt long options with values usage example

#!/bin/bash -e

ARGUMENT_LIST=(
  "arg-one"
  "arg-two"
  "arg-three"
)
@troyharvey
troyharvey / deployment.yml
Last active June 16, 2024 12:12
Using Kubernetes envFrom for environment variables
# Use envFrom to load Secrets and ConfigMaps into environment variables
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: mans-not-hot
labels:
app: mans-not-hot
spec:
replicas: 1
@TomyJaya
TomyJaya / spring-data-rest-notes.md
Last active June 5, 2024 17:03
Spring Data REST - Useful notes

How To change baseUri:

in application.properties add:

spring.data.rest.basePath=/api
  • or -

in application.yml add:

@vmwarecode
vmwarecode / snippet.js
Created July 14, 2016 04:14
Showing Web Console of a VM via vSphere HTML Console SDK
<html>
<head lang="en">
<meta charset="UTF-8">
<title>VM Web Console</title>
<!-- common js/css lib -->
<link href="css/wmks-all.css" rel="stylesheet" type="text/css" />
<link href="css/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="lib/jquery-1.8.3.min.js"></script>
<script src="lib/jquery-ui-1.8.16.min.js"></script>
@pgstenberg
pgstenberg / logstash-local.conf
Created May 15, 2016 18:28
logstash configuration example for kafka consuming logs
input {
syslog {
type => "haproxy-access"
port => 5000
}
log4j {
mode => "server"
host => "0.0.0.0"
port => 3456
type => "zookeeper"
FLOAT %{INT}\.[0-9]+
GC_TAG [^)]+
GC_TYPE [a-z-]+
GC_MEMORY_UNIT K|M|G
JVMGCLOG %{TIMESTAMP_ISO8601:logdate}: %{FLOAT}: \[GC( %{GC_TYPE})?( \(%{GC_TAG}\))* ?( %{INT:gc_memory_before:int}%{GC_MEMORY_UNIT:gc_memory_before_unit}->%{INT:gc_memory_after:int}%{GC_MEMORY_UNIT:gc_memory_after_unit}\(%{INT}%{GC_MEMORY_UNIT}\))?, %{FLOAT:gc_duration:float} secs\]
JVM_GC_STOPPED_TIME %{TIMESTAMP_ISO8601:logdate}: %{FLOAT}: Total time for which application threads were stopped: %{FLOAT:gc_app_stopped:float} seconds, Stopping threads took: %{FLOAT:gc_stopping_took:float} seconds
@thisismitch
thisismitch / topbeat.yml
Created February 1, 2016 19:48
Topbeat configuration with comments removed
input:
period: 10
procs: [".*"]
stats:
system: true
proc: true
filesystem: true
output: