Skip to content

Instantly share code, notes, and snippets.

View FFengIll's full-sized avatar
🎯
Focusing

FFengIll FFengIll

🎯
Focusing
  • Galaxy
View GitHub Profile
@eli-kha
eli-kha / nicegui_webview_demo.py
Created March 11, 2023 20:36
A small demo of using pywebview with NiceGUI based on wrapping both Unicorn.Server and webview in processes.
#!/usr/bin/env python3
import multiprocessing
import tempfile
from fastapi import FastAPI
from uvicorn import Config, Server
import webview
from nicegui import ui
@FFengIll
FFengIll / CHANGELOG.md
Created April 22, 2022 09:35 — forked from juampynr/CHANGELOG.md
Sample CHANGELOG

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased] - yyyy-mm-dd

Here we write upgrading notes for brands. It's a team effort to make them as

@ryanburnette
ryanburnette / Caddyfile
Last active May 13, 2024 10:55
Caddy v2.1+ CORS whitelist
(cors) {
@cors_preflight{args.0} method OPTIONS
@cors{args.0} header Origin {args.0}
handle @cors_preflight{args.0} {
header {
Access-Control-Allow-Origin "{args.0}"
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS"
Access-Control-Allow-Headers *
Access-Control-Max-Age "3600"
@YumaInaura
YumaInaura / ZSH.md
Last active January 8, 2023 14:11
Zsh — How to create user defined widget and map with bindkey ( For very beginner of zle )

Zsh — How to create user defined widget and map with bindkey ( For very beginner of zle )

Another titles

  • How to add customized event and bind keymap
  • The very beginner to zle of zsh keymapping with bindkey

Step. Create function in shell

@robleh
robleh / tcpshell.go
Last active June 6, 2022 08:15
Simple Golang TCP Reverse Shell Implant and Server
package main
import (
"flag"
"io"
"log"
"net"
"os"
"os/exec"
)
@miguelmota
miguelmota / local_ip.go
Created July 10, 2018 19:16
Golang get local IP
package network
import (
"errors"
"net"
)
// LocalIP get the host machine local IP address
func LocalIP() (net.IP, error) {
ifaces, err := net.Interfaces()
@juampynr
juampynr / CHANGELOG.md
Created March 27, 2018 09:35
Sample CHANGELOG

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased] - yyyy-mm-dd

Here we write upgrading notes for brands. It's a team effort to make them as

@StevenACoffman
StevenACoffman / Docker Best Practices.md
Last active April 29, 2024 08:36
Docker Best Practices

Mistakes to Avoid: Docker Antipatterns

Whichever route you take to implementing containers, you’ll want to steer clear of common pitfalls that can undermine the efficiency of your Docker stack.

Don’t run too many processes inside a single container

The beauty of containers—and an advantage of containers over virtual machines—is that it is easy to make multiple containers interact with one another in order to compose a complete application. There is no need to run a full application inside a single container. Instead, break your application down as much as possible into discrete services, and distribute services across multiple containers. This maximizes flexibility and reliability.

Don’t install operating systems inside Docker containers

It is possible to install a complete Linux operating system inside a container. In most cases, however, this is not necessary. If your goal is to host just a single application or part of an application in the container, you need to install only the essential

@reagent
reagent / 00_README.md
Last active January 29, 2024 13:31
Custom HTTP Routing in Go

Custom HTTP Routing in Go

Basic Routing

Responding to requests via simple route matching is built in to Go's net/http standard library package. Just register the path prefixes and callbacks you want invoked and then call the ListenAndServe to have the default request handler invoked on each request. For example:

package main

import (
@jmaxhu
jmaxhu / .git-commit-template.txt
Last active August 21, 2023 06:29 — forked from adeekshith/.git-commit-template.txt
一份建议的git commit模板
# <类型>: (类型的值见下面描述) <主题> (最多50个字)
# 解释为什么要做这些改动
# |<---- 请限制每行最多72个字 ---->|
# 提供相关文章和其它资源的链接和关键字
# 例如: Github issue #23
# --- 提交 结束 ---
# 类型值包含