Skip to content

Instantly share code, notes, and snippets.

View aisuhua's full-sized avatar
:octocat:
Flying

aisuhua aisuhua

:octocat:
Flying
  • 黑暗帝国
  • 广东深圳
View GitHub Profile
@aisuhua
aisuhua / Simple-HTTP-Upload.md
Created April 23, 2026 01:10 — forked from felbinger/Simple-HTTP-Upload.md
Simple http upload using nginx with webdav methods

A simple way, to exchange data, allows the following nginx configuration. Files can be uploaded (and overwritten) via a WebDAV put interface, and downloaded by using get requests. Any actions require the input of basic auth credentials for security reasons. The configuration is a single user mode, so even if multiple basic auth credentials are stored, the same files are visible to each user.

If no htpasswd file exists yet, it can be created with the following command:

# htpasswd comes from apache2-utils, install it using:
apt install apache2-utils 
@aisuhua
aisuhua / vmware.md
Created March 11, 2025 03:05 — forked from ayebrian/vmware.md
VMware ESXi 8 / vCenter 8 / Workstation 17 license key 2024
@aisuhua
aisuhua / reset-trial-navicat.sh
Created March 10, 2025 08:50 — forked from nakamuraos/reset-trial-navicat.sh
Reset trial Navicat 15, Navicat 16, Navicat 17 on Linux
#!/bin/bash
# Author: NakamuraOS <https://github.com/nakamuraos>
# Latest update: 06/24/2024
# Tested on Navicat 15.x, 16.x, 17.x on Debian, Ubuntu.
BGRED="\e[1;97;41m"
ENDCOLOR="\e[0m"
echo -e "${BGRED} ${ENDCOLOR}"
@aisuhua
aisuhua / gist:d681575b72deaba9596e45d0b69a0430
Created October 8, 2024 12:12 — forked from cormacrelf/gist:3760427
Pandoc Markdown -> latex with syntax highlighting
\documentclass[]{article}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifxetex
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\newcommand{\euro}{€}
\else
\ifluatex
\usepackage{fontspec}
@aisuhua
aisuhua / inotify_exec_on_file_change.sh
Created September 27, 2024 04:58 — forked from gwpl/inotify_exec_on_file_change.sh
inotifywait to exec specified command on each file change -> e.g. run "make", "pdflatex", or any other compile/upload or other command of choice! (Thanks https://superuser.com/a/181543/81861 ! )
#!/bin/bash
# Example usecase:
# inotify_exec_on_file_change.sh /path/phd paper.tex pdflatex paper.tex
dirn="$1"
filen="$2"
shift 2
echo "Watching directory $dirn for changes of file $filen . Watching directory insteaf of file to overcome behaviour of many text editors that replace file - Thanks to Giles and see his answer https://superuser.com/a/181543/81861 for more details. In case of matching even I execute:" $@
@aisuhua
aisuhua / content.md
Created August 25, 2024 12:16 — forked from ddai-dev/content.md
Linux 开机引导和启动过程详解

原文:Linux中国

你是否曾经对操作系统为何能够执行应用程序而感到疑惑?那么本文将为你揭开操作系统引导与启动的面纱。

-- David Both

本文导航

@aisuhua
aisuhua / content.md
Created August 25, 2024 12:16 — forked from ddai-dev/content.md
Linux 开机引导和启动过程详解

原文:Linux中国

你是否曾经对操作系统为何能够执行应用程序而感到疑惑?那么本文将为你揭开操作系统引导与启动的面纱。

-- David Both

本文导航

@aisuhua
aisuhua / ping.php
Created July 26, 2024 09:50 — forked from codearachnid/ping.php
Simple PHP ping request
<?php
function ping($host){
if(exec('echo EXEC') == 'EXEC'){
exec(sprintf('ping -c 1 -W 5 %s', escapeshellarg($host)), $res, $rval);
} elseif( function_exists('fsocketopen') ){
$port = 80;
$timeout= 6;
$fsock = fsockopen($host, $port, $errno, $errstr, $timeout);
if ( ! $fsock ){
@aisuhua
aisuhua / ping.php
Created July 26, 2024 09:50 — forked from codearachnid/ping.php
Simple PHP ping request
<?php
function ping($host){
if(exec('echo EXEC') == 'EXEC'){
exec(sprintf('ping -c 1 -W 5 %s', escapeshellarg($host)), $res, $rval);
} elseif( function_exists('fsocketopen') ){
$port = 80;
$timeout= 6;
$fsock = fsockopen($host, $port, $errno, $errstr, $timeout);
if ( ! $fsock ){

Kafka installation with systemd

0. Create kafka user

sudo adduser kafka
sudo adduser kafka sudo
su -l kafka

1. Download and Install kafka archive