Skip to content

Instantly share code, notes, and snippets.

View jan4984's full-sized avatar
🎯
Focusing

JiangYD jan4984

🎯
Focusing
  • moonshot.cn
  • ShangHai
View GitHub Profile
@jan4984
jan4984 / ws-c.cpp
Created August 29, 2019 08:18
websock in simple c++
#include <unistd.h>
#include <assert.h>
#include <iostream>
#include <string>
#include <wslay/wslay.h>
#include <sys/socket.h>
#include <netdb.h>
#include <cstring>
#include <poll.h>
@jan4984
jan4984 / main.go
Created February 17, 2020 11:00
simple txt copy via web
package main
import (
"fmt"
"html/template"
"io/ioutil"
"net/http"
)
var txt = ""
@jan4984
jan4984 / golangci-lint-present.html
Created March 23, 2020 04:16
golangci-lint presention
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>golangci-lint Lint Visualization</title>
<link href="https://unpkg.com/vue-json-tree@0.3.3/dist/json-tree.css" rel="stylesheet">
<script src="https://unpkg.com/vue@2.4.2/dist/vue.js"></script>
<script src="https://unpkg.com/vue-json-tree@0.3.3/dist/json-tree.js"></script>
</head>
<section>
@jan4984
jan4984 / golangci-lint-present.html
Created March 23, 2020 04:16
golangci-lint presention
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>golangci-lint Lint Visualization</title>
<link href="https://unpkg.com/vue-json-tree@0.3.3/dist/json-tree.css" rel="stylesheet">
<script src="https://unpkg.com/vue@2.4.2/dist/vue.js"></script>
<script src="https://unpkg.com/vue-json-tree@0.3.3/dist/json-tree.js"></script>
</head>
<section>
@jan4984
jan4984 / server.sh
Created July 30, 2021 05:31
vscode wsl2 snap nodejs
cat /home/jan/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679adfb3/server.sh
#!/usr/bin/env sh
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
case "$1" in
--inspect*) INSPECT="$1"; shift;;
esac
@jan4984
jan4984 / pass.go
Last active June 17, 2022 16:34
add pass to linux game console
package main
import (
"encoding/binary"
"fmt"
"io"
"os"
"strings"
)