Skip to content

Instantly share code, notes, and snippets.

View batkiz's full-sized avatar
⛈️
All those moments will be lost in time, like tears in rain.

Jinglue batkiz

⛈️
All those moments will be lost in time, like tears in rain.
View GitHub Profile

C#编码规范

概述

规范制定原则

  • 方便代码的交流和维护。
  • 不影响编码的效率,不与大众习惯冲突。
  • 使代码更美观、阅读更方便。
  • 使代码的逻辑更清晰、更易于理解。
@ethack
ethack / TypeClipboard.md
Last active June 21, 2024 09:56
Scripts that simulate typing the clipboard contents. Useful when pasting is not allowed.

It "types" the contents of the clipboard.

Why can't you just paste the contents you ask? Sometimes pasting just doesn't work.

  • One example is in system password fields on OSX.
  • Sometimes you're working in a VM and the clipboard isn't shared.
  • Other times you're working via Remote Desktop and again, the clipboard doesn't work in password boxes such as the system login prompts.
  • Connected via RDP and clipboard sharing is disabled and so is mounting of local drives. If the system doesn't have internet access there's no easy way to get things like payloads or Powershell scripts onto it... until now.

Windows

The Windows version is written in AutoHotKey and easily compiles to an executable. It's a single line script that maps Ctrl-Shift-V to type the clipboard.

@sanchezzzhak
sanchezzzhak / clickhouse-get-tables-size.sql
Created January 18, 2018 13:43
clickhouse get tables size
SELECT table,
formatReadableSize(sum(bytes)) as size,
min(min_date) as min_date,
max(max_date) as max_date
FROM system.parts
WHERE active
GROUP BY table
@cmod
cmod / hugofastsearch.md
Last active June 20, 2024 09:11 — forked from eddiewebb/readme.md
Fast, instant client side search for Hugo static site generator

Super fast, keyboard-optimized, client side Hugo search

This is a fork of and builds upon the work of Eddie Webb's search and Matthew Daly's search explorations.

It's built for the Hugo static site generator, but could be adopted to function with any json index compatible with Fuse fuzzy search library.

To see it in action, go to craigmod.com and press CMD-/ and start typing.

Fast Search

@AmyrAhmady
AmyrAhmady / sidebars.js
Last active March 7, 2021 11:36
Docusaurus sidebar generator by name of directories and files!
const fs = require("fs");
const path = require('path');
const SIDE_BAR_NAME = 'Sidebar';
const CATEGORY_NAME_CAPITALIZATION = true;
function parseDir(filename) {
const stats = fs.lstatSync(filename);
const info = {}
@muesli
muesli / .golangci.yml
Created January 8, 2022 07:00
Extensive golangci-lint config
run:
tests: false
issues:
include:
- EXC0001
- EXC0005
- EXC0011
- EXC0012
- EXC0013
@JSinghDev
JSinghDev / LXCBindMount.md
Last active June 27, 2024 15:18 — forked from ajmassi/LXCBindMount.md
Create a bind mount from a Proxmox host on an unprivileged lxc container

Proxmox Assign Bind Mount To Unprivileged Container

In order for the LXC container to have full access the proxmox host directory, a subgid is set as owner of a host directory, and an ACL is used to ensure permissions.

Bind Mount dataset to LXC

Add the following line to /etc/pve/lxc/<CT_ID>.conf

mp0:/mount/point/on/host,mp=/mount/point/on/lxc

OR

pct set 100 -mp0 /mnt/bindmounts/shared,mp=/shared