Skip to content

Instantly share code, notes, and snippets.

View overdrive3000's full-sized avatar
🇻🇪
de venezuela pa' españa

Juan Manuel Mesa overdrive3000

🇻🇪
de venezuela pa' españa
View GitHub Profile
package log_test
import (
"bytes"
"encoding/json"
"nomad-datadog-exporter/internal/log"
"os"
"testing"
"github.com/google/go-cmp/cmp"
@overdrive3000
overdrive3000 / log_test.go
Created August 20, 2022 12:01
Log package test file
package log_test
import (
"bytes"
"encoding/json"
"nomad-datadog-exporter/internal/log"
"os"
"testing"
"github.com/google/go-cmp/cmp"
@overdrive3000
overdrive3000 / karpenter.ts
Created January 25, 2022 16:25 — forked from gbvanrenswoude/karpenter.ts
Karpenter Construct for AWS CDK v2
import { aws_eks as eks } from "aws-cdk-lib";
import { aws_iam as iam } from "aws-cdk-lib";
import { aws_ec2 as ec2 } from "aws-cdk-lib";
import { aws_ssm as ssm } from "aws-cdk-lib";
import { Construct } from "constructs";
import { Duration, CfnJson } from "aws-cdk-lib";
interface KarpenterProps {
/**
* The FargateCluster on which karpenter needs to be added
// Package clock mocks a simple clock which only
// supports hours and minutes and basic add, sub
// operations in minutes.
package clock
import (
"fmt"
)
// day number of minutes in a day

Keybase proof

I hereby claim:

  • I am overdrive3000 on github.
  • I am overdrive (https://keybase.io/overdrive) on keybase.
  • I have a public key whose fingerprint is C8D7 0ADC 6034 6C93 AC03 110B 1DE5 E7B4 80DD B1DD

To claim this, I am signing this object:

@overdrive3000
overdrive3000 / cilium-etcd-operator.log
Last active January 13, 2019 23:17
Error with cilium etcd operator in EKS
2019-01-13 23:14:50.296579 I | etcdmain: etcd Version: 3.3.10
2019-01-13 23:14:50.296910 I | etcdmain: Git SHA: 27fc7e2
2019-01-13 23:14:50.296932 I | etcdmain: Go Version: go1.10.4
2019-01-13 23:14:50.296943 I | etcdmain: Go OS/Arch: linux/amd64
2019-01-13 23:14:50.296953 I | etcdmain: setting maximum number of CPUs to 2, total number of available CPUs is 2
2019-01-13 23:14:50.297022 I | embed: peerTLS: cert = /etc/etcdtls/member/peer-tls/peer.crt, key = /etc/etcdtls/member/peer-tls/peer.key, ca = , trusted-ca = /etc/etcdtls/member/peer-tls/peer-ca.crt, client-cert-auth = true, crl-file =
2019-01-13 23:14:50.298787 I | embed: listening for peers on https://0.0.0.0:2380
2019-01-13 23:14:50.299013 I | embed: listening for client requests on 0.0.0.0:2379
2019-01-13 23:14:50.307329 W | pkg/netutil: failed resolving host cilium-etcd-6wlnf9pp2v.cilium-etcd.kube-system.svc:2380 (lookup cilium-etcd-6wlnf9pp2v.cilium-etcd.kube-system.svc on 10.100.0.10:53: no such host); retrying in 1s
2019-01-13 23:14:51.312056 W |
@overdrive3000
overdrive3000 / mysql.yaml
Created November 2, 2018 15:46
MySQL with PVC in K8S
# Persisten Volume for database
# it should use EBS
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: database
annotations:
volume.beta.kubernetes.io/storage-class: default
spec:
accessModes:
@overdrive3000
overdrive3000 / liststacks.sh
Created December 22, 2017 15:38
List Cloudformation Stacks by Tag
#!/bin/bash
usage(){
echo "Usage: $0 -k <Key> -v <Value>"
echo "Sample: $0 -k Name -v MyStack"
echo "Note: Key and Value are case sensitive"
exit 1
}
while getopts k:v: option
@overdrive3000
overdrive3000 / C-states.md
Created May 9, 2017 09:24 — forked from wmealing/C-states.md
What are CPU "C-states" and how to disable them if needed?

To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.

Here we limit the system to only C-State 1:

    kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1

On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:

set nocompatible " be iMproved no compatible with old VI
set t_Co=256 " Support for 256 colors
" Enabling Plug
set nocompatible
filetype off
call plug#begin('~/.vim/plugged')
" Automatic enclose