Skip to content

Instantly share code, notes, and snippets.

@quark-zju
quark-zju / list_cn_ip.rb
Created April 27, 2012 05:11
List allocated china ip addresses
#!/usr/bin/env ruby
# List latest china IPv4 list
require 'open-uri'
(ARGF.path == '-' ? open('http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest') : ARGF).lines.each do |l|
next if !l.include?('ipv4') || l.include?('*')
cc, type, start, value = l.split('|')[1, 4]
@sneal
sneal / install-vmware-tools.ps1
Created October 15, 2014 15:40
Install VMWare tools PowerShell script
$version = '9.6.1'
# from /Applications/VMware Fusion.app/Contents/Library/isoimages/windows.iso
$iso_name = 'vmware_fusion_tools_windows_6.0.3.iso'
$download_url = "http://host.example.com/$iso_name"
(New-Object System.Net.WebClient).DownloadFile($download_url, "c:\windows\temp\$iso_name")
&c:\7-zip\7z.exe x "c:\windows\temp\$iso_name" -oc:\windows\temp\vmware -aoa | Out-Host
&c:\windows\temp\vmware\setup.exe /S /v`"/qn REBOOT=R`" | Out-Host
@allysonsilva
allysonsilva / Full-Markdown.md
Last active July 26, 2025 03:22
⚡️ Full Markdown Example

Headers

# h1 Heading 8-)
## h2 Heading
### h3 Heading
#### h4 Heading
##### h5 Heading
###### h6 Heading
@anka
anka / .gitlab-ci.yml
Created April 12, 2019 13:10
GitLab CI configuration to lint and build Docker images and push them to AWS ECR
stages:
- Lint images
- Build and publish images
## Load a node.js image, install dockerlint and lint all Dockerfiles
linting:
stage: Lint images
image: node:4-alpine
script:
- npm install -g dockerlint && npm cache clean
@LukeHackett
LukeHackett / download.sh
Created June 19, 2019 10:48
Download a nexus artifact with curl
#!/bin/sh
NEXUS_ENDPOINT="http://nexus.com"
GROUP="com.github.lukehackett"
ARTIFACT="demo-applciation"
VERSION="1.0.0-SNAPSHOT"
REPO="snapshots"
PACKAGING="jar"
curl --silent --location \
@chriswayg
chriswayg / Ubuntu_Debian_Cloud_images_in_Proxmox.md
Last active June 6, 2025 15:29
Ubuntu and Debian Cloud images in Proxmox
@mattmattox
mattmattox / rke_recovery.sh
Last active May 28, 2024 22:09
Recovering cluster.yml and cluster.rkestate from kubeconfig
#!/bin/bash
echo "Building cluster_recovery.yml..."
echo "Working on Nodes..."
echo 'nodes:' > cluster_recovery.yml
kubectl --kubeconfig kube_config_cluster.yml -n kube-system get configmap full-cluster-state -o json | jq -r .data.\"full-cluster-state\" | jq -r .desiredState.rkeConfig.nodes | yq r - | sed 's/^/ /' | \
sed -e 's/internalAddress/internal_address/g' | \
sed -e 's/hostnameOverride/hostname_override/g' | \
sed -e 's/sshKeyPath/ssh_key_path/g' >> cluster_recovery.yml
echo "" >> cluster_recovery.yml
@janeczku
janeczku / rancher-argocd.md
Created June 10, 2020 14:10
How to register Rancher managed Kubernetes clusters in Argo CD

How to register Rancher managed Kubernetes clusters in Argo CD

Registering Rancher managed clusters in Argo CD doesn't work out of the box unless the Authorized Cluster Endpoint is used. Many users will prefer an integration of Argo CD via the central Rancher authentication proxy (which shares the network endpoint of the Rancher API/GUI). So let's find out why registering clusters via Rancher auth proxy fails and how to make it work.

Hint: If you are just looking for the solution scroll to the bottom of this page.

Why do i get an error when running argocd cluster add?

Service Account tokens and the Rancher authentication proxy

@farunurisonmez
farunurisonmez / Dockerized-PostgreSQL-17-Ubuntu-24.04.1.md
Last active July 5, 2025 21:28
Docker Compose Configuration for PostgreSQL 17 on Ubuntu 24.04.1 with Static IP and Custom Settings

Dockerized PostgreSQL 17 Service on Ubuntu 24.04.1 (AMD64)

Overview

This document outlines the configuration and deployment process of a Dockerized PostgreSQL database service using Docker Compose, optimized for use on Ubuntu 24.04.1. The setup ensures high availability, persistent data storage, and efficient resource management, while adhering to best practices for containerized services in production environments.

Table of Contents

  1. System Requirements
  2. Project Structure