Skip to content

Instantly share code, notes, and snippets.

View hlwanghl's full-sized avatar

Hongliang Wang hlwanghl

View GitHub Profile
@Jiab77
Jiab77 / upgrade-systemd-on-ubuntu-18.04.md
Last active December 11, 2023 20:18
Upgrade systemd on Ubuntu 18.04

Upgrade systemd on Ubuntu 18.04

In this document, I will explain how to upgrade the default systemd version from 237 to 242.

The main reason why I needed this was related to the DNS-over-TLS that was not supported in the version 237 but available from version 242.

Later, when playing with Lynis, the security auditing tool, I then discovered that the version 242 was also providing the command systemd-analyze that is used by lynis to detect if existing systemd services are configured correctly in the security context, meaning that the existing services can run as expected but needs few or several changes in their configuration to make them safe without any exploitable attack surfaces.

You can try it once you've installed the version 242 of systemd that way:

@pohzipohzi
pohzipohzi / redis-example.go
Last active March 22, 2022 15:59
Examples from redigo
// this is a file that puts together all redigo examples for convenience
// (see https://godoc.org/github.com/gomodule/redigo/redis#pkg-examples)
//
// start by ensuring that redis is running on port 6379 (`redis-server`)
// uncomment the main method as needed, and run the script (`go run main.go`)
package main
import (
"fmt"
"github.com/gomodule/redigo/redis"
@willwhui
willwhui / Connect to Google Home
Created June 1, 2017 13:57
Connect to Google Home
Connect to Google Home
@staltz
staltz / introrx.md
Last active May 24, 2024 07:56
The introduction to Reactive Programming you've been missing
@sr75
sr75 / wget-jdk-oracle-install-example.txt
Last active March 16, 2023 11:28
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu
@soarez
soarez / ca.md
Last active May 23, 2024 22:39
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.