Skip to content

Instantly share code, notes, and snippets.

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* syscalls.h - Linux syscall interfaces (non-arch-specific)
*
* Copyright (c) 2004 Randy Dunlap
* Copyright (c) 2004 Open Source Development Labs
*/
#ifndef _LINUX_SYSCALLS_H
#define _LINUX_SYSCALLS_H
package main
import (
"io/ioutil"
"log"
"net/http"
"time"
)
func main() {
---
# Source: grafana/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
helm.sh/chart: grafana-5.8.10
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: grafana
app.kubernetes.io/version: "7.2.1"
// +build ignore
#include <stddef.h>
#include <linux/sched.h>
#include <linux/bpf.h>
#include <linux/ptrace.h>
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <bpf/bpf_core_read.h>
//go:build linux
// +build linux
package main
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
@mrproliu
mrproliu / main.go
Created March 19, 2022 07:28
rust profiling
//go:build linux
// +build linux
package main
import (
"bytes"
"debug/elf"
"encoding/binary"
"errors"
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@mrproliu
mrproliu / scale-bookinfo.sh
Created January 21, 2022 03:32
Scalling bookinfo application
kubectl scale --replicas=3 deployment/productpage-v1 deployment/details-v1
@mrproliu
mrproliu / deploy-hpa.sh
Created January 21, 2022 03:31
Deploy Kubernetes HPA resource
kubectl apply -f https://raw.githubusercontent.com/mrproliu/sw-satellite-demo-scripts/5821a909b647f7c8f99c70378e197630836f45f7/resources/satellite-hpa.yaml
@mrproliu
mrproliu / deploy-swck-adapter.sh
Created January 21, 2022 03:29
Deploy metrics adapter from SWCK v0.6.1 release
kubectl apply -f skywalking-swck/config/adapter-bundle.yaml