Skip to content

Instantly share code, notes, and snippets.

View vietor's full-sized avatar
🎯
Focusing

Vietor Liu vietor

🎯
Focusing
View GitHub Profile
@vietor
vietor / md-renderer.html
Last active February 18, 2024 19:44
Nginx render markdown by browser
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/milligram/1.4.1/milligram.min.css">
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.1.2/styles/github.min.css">
<script type="application/javascript" src="https://cdn.bootcdn.net/ajax/libs/marked/1.1.1/marked.min.js"></script>
<script type="application/javascript" src="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.1.2/highlight.min.js"></script>
<style rel="stylesheet">
body {
@vietor
vietor / gist:3b404da3d6a6ac5e514684de746671e3
Last active March 5, 2021 12:14
Modify for .globalrc
# Add for skip
```
*.js.map,downloads/,CMakeFiles/,*_.py,deps/,bin/,*.css,*.log,*.jpg,*.jpeg,*.gif,*.png,*.svg,venv/,VENV/,Classes/,ios\/Pods/,build/,tmp/,data/,temp/,elpa*/,classes/,target/,.aproject/,bower_components/,node_modules/,
```
@vietor
vietor / ogrok.js
Last active February 4, 2024 05:53
ogrok introspectable tunnels to localhost
const net = require('net');
const IdMaker = (function() {
var seq = 0;
return {
next: () => {
seq = (++seq) % 10000;
return Date.now() + '-' + seq;
}
@vietor
vietor / autopath.txt
Last active September 6, 2016 10:58
Bash Profile
#!/bin/bash
for file in ~/.devenv/*;
do
if [ -d $file ]; then
if [ -d $file/bin ]; then
PATH=`(cd $file/bin && pwd)`:$PATH
fi
fi
done
#!/bin/bash
if [ ! -f "$1" ]; then
echo "File not found!"
exit
fi
HOSTFILE=$1
function reverse {
#!/bin/bash
declare -a array
array[0]="/usr/local/php/bin/php /wwwroot/kbl/tools/ClearGameLog.php"
array[1]="/usr/local/php/bin/php /wwwroot/kbl/tools/ProcessPvpRating.php"
let array_max=${#array[@]}-1
function is_index_exists {
@vietor
vietor / ALittleJavaCodes
Last active December 24, 2015 01:19
Chaos java tools
SendMail
ImageUtils
#include <stdio.h>
#include <time.h>
#include <string.h>
#include <signal.h>
#include <unistd.h>
#include <execinfo.h>
static void signal_dump(int sig)
{
FILE* fp;