Skip to content

Instantly share code, notes, and snippets.

View navono's full-sized avatar
:octocat:
I may be slow to respond.

Darkness navono

:octocat:
I may be slow to respond.
View GitHub Profile
@navono
navono / settings.json
Created August 12, 2022 06:27
vscode settings.json
{
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll": true
}
}
@navono
navono / debug
Created August 7, 2022 05:32
conan profile: debug
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=16
build_type=Debug
[options]
[build_requires]
@navono
navono / launch.json
Created February 23, 2022 06:10 — forked from cecilemuller/launch.json
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
@navono
navono / nginx.conf
Created March 9, 2022 00:37
download electron package behind nginx reverse proxy
#user nobody;
worker_processes 1;
error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@navono
navono / settings.xml
Created February 24, 2022 08:01
maven aliyun
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
@navono
navono / mouse.py
Last active October 14, 2021 06:07
检测鼠标点击
# This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
from pynput import mouse
from psutil import *
import time
from datetime import datetime
class mouseTimer(object):
@navono
navono / .bashrc
Created September 30, 2021 01:59
.bashrc for WSL2
# CUSTOM MIRRORS
export HOST_IP=$(grep -oP '(?<=nameserver\ ).*' /etc/resolv.conf)
export PORXY_ADDR="http://$HOST_IP:1080"
# PROXY FOR APT
function proxy_apt() {
# make sure apt.conf existed
sudo touch /etc/apt/apt.conf
sudo sed -i '/^Acquire::https\?::Proxy/d' /etc/apt/apt.conf
@navono
navono / CMakeLists.txt
Created July 7, 2021 07:42
CMake include Windows SDK path
include(FindWindowsSDK)
if (NOT WINDOWSSDK_FOUND)
message("Windows SDK not found")
endif()
get_windowssdk_include_dirs(${WINDOWSSDK_LATEST_DIR} WINDOWSSDK_INCLUDE_DIRS)
# message(${WINDOWSSDK_INCLUDE_DIRS})
target_include_directories(${TARGET} INTERFACE ${WINDOWSSDK_INCLUDE_DIRS})
set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE /SAFESEH:NO")
@navono
navono / proto.js
Created July 6, 2021 09:06
compile proto file with js
const path = require('path');
const fs = require('fs');
const shell = require('shelljs');
const rimraf = require('rimraf');
// https://github.com/shelljs/shelljs/issues/469
process.env.PATH += (path.delimiter + path.join(process.cwd(), 'node_modules', '.bin'));
const PROTO_DIR = path.join(__dirname, '../proto');
const OUT_DIR = path.join(__dirname, '../src/proto');
@navono
navono / schema_adapter_sqlite3.go
Created February 5, 2021 11:21
watermill sqlite3
package main
import (
stdSQL "database/sql"
"encoding/json"
"fmt"
"strings"
"github.com/pkg/errors"