Skip to content

Instantly share code, notes, and snippets.

View philipz's full-sized avatar

philipz philipz

View GitHub Profile
@philipz
philipz / logstash-1-collectd.conf
Last active September 3, 2015 08:00 — forked from untergeek/logstash-1-collectd.conf
Logstash 1.4.1+ Collectd configuration
# This is the simplest definition, with the addition of a type
input {
udp {
port => 25826 # Must be specified. 25826 is the default for collectd
buffer_size => 1452 # Should be specified. 1452 is the default for recent versions of collectd
codec => collectd { } # This will invoke the default options for the codec
type => "collectd"
}
}
@philipz
philipz / README.md
Last active September 2, 2015 09:32 — forked from mmoulton/README.md
Docker Container Stats Collection Using Collectd

Docker stats collection for collectd

This script can be used to feed collectd with cpu and memory usage statistics for running docker containers using the collectd exec plugin.

This script will report the used and cached memory as well as the user and system cpu usage by inspecting the appropriate cgroup stat file for each running container.

Usage

This script is intented to be executed by collectd on a host with running docker containers. To use, simply configure the exec plugin in collectd to execute the collectd-docker.sh script. You may need to adjust the script to match your particulars, such as the mount location for cgroup.

@philipz
philipz / gist:87ad761df64fb8c465a2
Last active March 9, 2021 18:47
QEMU QCOW2 Image
# Epitome
I want to have os image that can login with password.
download UEC image.
for example, this precise.
http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img
this image was forbidden to password login feature in terminal console.
it's reasonable for use of cloud image.

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

{
"title": "SSH analysis",
"services": {
"query": {
"list": {
"0": {
"query": "message:\"Invalid user\" AND sshd",
"alias": "Failed login",
"color": "#BF1B00",
"id": 0,
$ sudo docker run -i -t futurecore/parallella-devenv /bin/bash
dev@6940b5150ffb:~$ ls
buildroot examples
dev@6940b5150ffb:~$ cd examples/apps/hello-world/
dev@6940b5150ffb:~/examples/apps/hello-world$ ls
Debug build.sh run.sh src
dev@6940b5150ffb:~/examples/apps/hello-world$ ./build.sh
src/hello_world.c:35:19: fatal error: e-hal.h: No such file or directory
#include <e-hal.h>
^
# 內容
# repo 位置
- https://github.com/facebook/react
- https://github.com/facebook/flux
# 官網
- React
* http://facebook.github.io/react/
@philipz
philipz / tmux.md
Created August 27, 2014 04:33 — forked from andreyvit/tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a