Skip to content

Instantly share code, notes, and snippets.

apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: node-exporter
spec:
template:
metadata:
labels:
app: node-exporter
annotations:
@wjx0912
wjx0912 / cross-compile_filebeat_arm.md
Last active July 3, 2020 23:05 — forked from lvaylet/cross-compile_filebeat_arm.md
Cross-compile Elastic Filebeat for ARM with docker. Works on Raspberry Pi 2 and 3.

Elastic does not provide Filebeat binaries for ARMv7. Luckily, Filebeat can easily be cross-compiled with:

# ----- Instantiate an immutable Go container for cross-compilation ----- #
mkdir build && cd $_
docker run -it --rm -v `pwd`:/build golang:1.11.4 /bin/bash

# ----- Inside Go container ----- #
go get github.com/elastic/beats
cd /go/src/github.com/elastic/beats/filebeat/
@wjx0912
wjx0912 / console.dart
Created March 14, 2019 11:58 — forked from graphicbeacon/console.dart
Final snippets for "How to use JavaScript libraries in your Dart applications" article
// web/console.dart
@JS('console')
library console;
import 'package:js/js.dart';
external void log(dynamic str);
@wjx0912
wjx0912 / memcpy_perf_measure.cpp
Created September 2, 2021 06:12 — forked from daramkun/memcpy_perf_measure.cpp
Memory Copy Performance Measure (memcpy, ID3D11DeviceContext::CopyResource)
#include <Windows.h>
#include <d3d11.h>
#include <atlbase.h>
#pragma comment (lib, "d3d11.lib")
#include <iostream>
#include <thread>
#include <chrono>
#include <memory>
#include <vector>