Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View lobatt's full-sized avatar
🏠
Working from home

Li, Cheng lobatt

🏠
Working from home
View GitHub Profile
did:3:bafyreibs7kk4ibxq2pstmuq7peb3woc4tf3rpywtoz5quirga2liyy6qzy
@lobatt
lobatt / feed2md.go
Last active December 18, 2016 15:03
Go program to migrate blog posts to Hugo via RSS feed xml (specially made for micolog)
//Usage:
// First set your blog feed generate to dump all feed entries
// $ wget http://yourdomain.com/feed -O feed.xml
// OR you can just export your data as rss 2.0 feed.
// Then:
// $ go run feed2md.go
// It will generate a bunch of .md files, one for each blog item.
// Now move those items to your content dir, and you are done.
// This program will generate archetypes for hugo engine, inlcuding aliases for the old URL pattern
@lobatt
lobatt / logstash-lumberjack.conf
Last active August 29, 2015 14:12
Logstash config sample for lumberjack input to work with logstash-forwarder
input {
stdin {
type => "stdin-type"
}
file {
type => "syslog"
path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ]
start_position => "beginning"
}
@lobatt
lobatt / Makefile
Last active December 14, 2015 13:58
Handy Makefile for testing
CC=g++
CFLAGS=-g -c -Wall
LDFLAGS=
CXX_SOURCES=$(wildcard *.cpp)
C_SOURCES=$(wildcard *.c)
CXX_OBJECTS=$(SOURCES:.cpp=.o)
C_OBJECTS=$(C_SOURCES:.c=.o)
OBJECTS=$(C_OBJECTS) $(CXX_OBJECTS)
EXECUTABLE=hello