Skip to content

Instantly share code, notes, and snippets.

@janeczku
janeczku / rancher-ha-cert-update.md
Last active April 11, 2022 16:40
rancher-ha-cert-update.md

Follow these steps to update the SSL certificate of the ingress in a Rancher High Availability installation or switch from the default self-signed to a custom certificate:

  1. Create or update the tls-rancher-ingress k8s secret resource with the new certificate and private key
  2. Create or update the tls-ca k8s secret resource with the root CA certificate (only required when using a private CA)
  3. Update Rancher installation using Helm CLI
  4. Reconfigure Rancher Agents to trust the new CA certificate

Detailed steps

1. Create/Update the certificate secret resource

@janeczku
janeczku / 00-cloud-config.yml
Last active June 10, 2023 15:10
Annotated RancherOS Cloud-init configuration snippets
#cloud-config
# Set the hostname for this machine (takes precedence over hostname assigned by DHCP lease).
hostname: myhost
# Authorize SSH keys for the `rancher` sudoer user
ssh_authorized_keys:
- ssh-rsa AAA...ZZZ example1@rancher
@prologic
prologic / SelfHosted.md
Last active November 4, 2023 13:25
Self-hosted Golang apps by James Mills / prologic

Self-Hosted Go (Golang) Web Apps

  • golinks - golinks is a web app that allows you to create smart bookmarks, commands and aliases by pointing your web browser's default search engine at a running instance. Similar to bunny1 or yubnub. (Demo) MIT Go
  • notes - notes is a self-hosted note taking web app that lets you keep track of your notes and search them in a easy and minimal way. (Demo) MIT Go
  • pastebin - pastebin is a simple pastebin service with convenient CLI. (Demo) MIT Go
  • shorturl - shorturl is a simple URL shortener with very tiny URL(s). (Demo) MIT Go
  • todo - todo is a simple todo manager. (Demo) MIT Go
  • [wiki](https://git.mills.io/prolog
# 你可以从该 URL 下载这个配置文件: http://surge.run/config-example/ios.conf
# 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备
# Version 2.0
[General]
# 日志等级: warning, notify, info, verbose (默认值: notify)
loglevel = notify
# 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理。(在 macOS
# 版本中,如果启用了 Set as System Proxy, 那么这些值会被写入到系统网络代理
# 设置中.)
@justincjahn
justincjahn / 10-cisco-elasticsearch.conf
Last active March 10, 2024 17:36
Logstash: Processing Cisco Logs
#
# INPUT - Logstash listens on port 8514 for these logs.
#
input {
udp {
port => "8514"
type => "syslog-cisco"
}
@f1sherman
f1sherman / forwarding-example.md
Last active March 12, 2021 00:21
Port Forwarding Example in OS X El Capitan

Add the following to /etc/pf.anchors/myname:

rdr pass on lo0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 4000
rdr pass on lo0 inet proto tcp from any to any port 443 -> 127.0.0.1 port 4001

Add the following to /etc/pf-myname.conf:

rdr-anchor "forwarding"
load anchor "forwarding" from "/etc/pf.anchors/myname"
@iaean
iaean / README.md
Last active October 16, 2023 03:06
Howto remove undesirable datasets from RRD

Overview

Sometimes arises the wish to delete some broken datasets from RRD files. This is not possible out-of-the-box by design. But there are the rrdtool dump/restore commands. The interchange format is XML. So the idea is to modify the XML before restoring it.

There are two little deficiencies with the XML. It's not documented and some useful information is provided by XML comments instead of be part of the XML itself. This makes XSLT processing difficult.

Here are some XSLT transformations, that are trying to handle the deletion of some datasets and producing

@haotian-liu
haotian-liu / express-company.js
Last active February 19, 2020 09:58
A javascript that can differentiate the express IDs of different express companies
var jsoncom = {
'company': [{
'companyname': '申通快递',
'shortname': '申通',
'tel': '95543',
'url': 'st',
'code': 'shentong',
'hasvali': 0,
'comurl': 'http://www.sto.cn',
'isavailable': '0',
@tiye
tiye / copy.md
Created March 18, 2014 01:32
Github 上有趣的资料

和大家分享一下我整理的有趣的Github repository,项目地址在repo_starred

欢迎大家fork或者给我发issue

部分内容如下,不定期更新:

GitHub Starred Projects

##navigation