Skip to content

Instantly share code, notes, and snippets.

@islishude
islishude / k8s-install.md
Last active March 17, 2025 07:00
k8s-国内源安装

MOVE TO HERE

注意以下命令,需要切换到 root 后运行

安装 docker

首先确定已经安装完成 docker,如果没有安装可以使用以下脚本快速安装并配置:

@lillypad
lillypad / rsa.hpp
Last active August 4, 2024 12:30
OpenSSL RSA Encryption / Decryption C++ Wrapper
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>
#include <openssl/err.h>
#define CRYPTO_RSA_KEY_LEN_4096 4096
#define CRYPTO_RSA_KEY_LEN_2048 2048
#define CRYPTO_RSA_KEY_LEN_1024 1024
@jimmychu0807
jimmychu0807 / string-conversion.rs
Created November 21, 2019 10:20
Conversion between String, str, Vec<u8>, Vec<char> in Rust
use std::str;
fn main() {
// -- FROM: vec of chars --
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}'];
// to String
let string1: String = src1.iter().collect::<String>();
// to str
let str1: &str = &src1.iter().collect::<String>();
// to vec of byte
@freifrauvonbleifrei
freifrauvonbleifrei / git_clone_ssh_through_reverse_tunnel.md
Created December 19, 2019 15:29
Getting ssh internet access for firewalled systems, such as HPC systems

Getting github access on a firewalled system

This approach, based on [0] and [1] lets me reverse-tunnel through the local machine, to get github (and other) access on protected machines, such as HPC compute systems.

I put these lines in my local ~/.ssh/config file

Host somehpcsocks
 ProxyCommand ssh -D 2020 localhost nc -q 1 localhost 22
@chriselsner
chriselsner / nix-on-macos-catalina.md
Last active September 19, 2024 00:46
Nix on macOS Catalina

Nix on macOS Catalina

I'm writing this gist for my own records but it might help someone else too.

Installing Nix

Support for Catalina has improved a lot since the update was first rolled out.

Note: See the NixOS manual for discussion of the --darwin-use-unencrypted-nix-store-volume option.