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 / 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

@aisuhua
aisuhua / auto_tags.py
Created April 10, 2024 11:14 — forked from rkrzr/auto_tags.py
Automatically generate ansible tags of the same name for each role in a playbook
"""
This module implements an Ansible plugin that is triggered at the start of a playbook.
The plugin dynamically generates a tag for each role. Each tag has the same name as its role.
The advantage of this is that it saves you some boilerplate, because you don't have to wrap
all tasks of a role in an additional block and assign a tag to that.
Additionally, it works automatically when you add new roles to your playbook.
Usage is exactly the same as without this plugin: