Skip to content

Instantly share code, notes, and snippets.

View jimmy947788's full-sized avatar
🙄
faping

吉掰米 jimmy947788 jimmy947788

🙄
faping
View GitHub Profile
@jimmy947788
jimmy947788 / spdlog_snippets.c
Created August 16, 2022 15:40
方便使用 spdlog 設定
#define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_TRACE //一定要在 spdlog.h 之前定義
#include <spdlog/spdlog.h>
#include <spdlog/async.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/sinks/daily_file_sink.h>
int main(){
// 清掉已註冊logger
spdlog::drop_all();
@jimmy947788
jimmy947788 / usb_key_press.ino
Created May 19, 2022 07:36
this is arduino micro press button and exeute command
#include <Keyboard.h>
const int BTN2_PIN = 2; // input pin for pushbutto
const int BTN3_PIN = 3; // input pin for pushbutton
int btn2_prevState; //紀錄按紐2上次一次狀態
int btn3_prevState; //紀錄按紐3上次一次狀態
@jimmy947788
jimmy947788 / dock.daedalus.cc.conf
Created April 18, 2022 14:30
用Nginx綁定domain 指向 container對應的 port
server {
server_name dock.daedalus.cc;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
send_timeout 300;
listen 443 ssl; # managed by Certbot
@jimmy947788
jimmy947788 / nas.daedalus.cc.conf
Created April 18, 2022 14:26
Nginx 架設 Open Media Vault 使用的設定檔( 包和Certbot 憑證參數)
# This file is auto-generated by openmediavault (https://www.openmediavault.org)
# WARNING: Do not edit this file, your changes will get lost.
server {
server_name nas.daedalus.cc; # managed by Certbot
root /var/www/openmediavault; #綁對應路徑
index index.html;
autoindex off;
server_tokens off;
sendfile on;
large_client_header_buffers 4 32k;