Skip to content

Instantly share code, notes, and snippets.

View bitmori's full-sized avatar
🧭

新房 森人 bitmori

🧭
  • 未満工房
  • Da'at
View GitHub Profile
@bitmori
bitmori / README.md
Last active March 16, 2025 20:11 — forked from ioExpander/batterySaver.1m.sh
SwiftBar plugin to save your ARM based macbook's battery by limiting charging to 80% using the battery CLI.
@bitmori
bitmori / settings.jsonc
Last active December 25, 2024 05:16 — forked from killshot13/settings.jsonc
vscode配置
{
// vscode全局 彩色设置
// Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.
"editor.bracketPairColorization.enabled": true,
// Controls whether the editor should render indent guides.
"editor.guides.indentation": true,
// Controls whether bracket pair guides are enabled or not.
// - true: Enables bracket pair guides.
// - active: Enables bracket pair guides only for the active bracket pair.
// - false: Disables bracket pair guides.
@bitmori
bitmori / producer_consumer.cpp
Last active April 24, 2020 06:33
c++17生产者消费者利用条件变量达成有上限队列
// clang++ -std=c++17 -o main main.cpp
#include <iostream>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <queue>
#include <future>
constexpr size_t kMaxQueueSize = 10;
@bitmori
bitmori / decrypt.py
Last active December 28, 2019 20:57
matchland save editor
import base64
import xxhash
import struct
cryptoKey = b"e806f6"
pref_key = b"EEtVRBZECl5ZWgM="
pref_str = b'DlEAHBUACB9LVkdRChIaRhQQHQAAFwsbDwQJF0cCEgdXGURESkBAQ1ZGWVtfUA8KAl4UWVNHEAUcCwoMGAwIXUIUXBRFQkpCQV1fVlldRVUICgZWDEVDR15QUAcJHB4JHExZWwNEV0lHQ0FdXlFGXlVUARAGUQxEQ19BQ1BDRksEChBKXE8SXxgWFy00Ex0NS1ZHVQkfBlcZRUNVQ1BCX1xZXF9VCBIaRhQREgweCQYGCwweR18aAQdJB0JcV0JBS09WXlZUVQIDBUQaVVEEABUcDi0MFTEMVVVERAxXQ1RdQENAVllcVEUIAAxWBk9DVVBcUk0CGwMVEVFdUxQUT1FUQ19DWElbXFRcGAABXAdFSVZBUl5PRA0NFw5nVEQJRgEaCBcCUFVEWV1KVQkfBlYGRFNVQkpCX1xZXEdJGBJRCVoRUV9QQkJfVllcVVUIABRKFlcXBAAbLQQDEB9HXxoAFEoWVxgACwNQVURbXFVVCAAGVgZFUUlSUhUKCxpOX0cKAAZWBkVDVUJAUENGSxQVRwISBFMUWVNHAQQTHRVLVkdUChIaRhQGBwQAAy0LBxsHR18aABRKFlcLFR4VBAoKS1ZHVxocFkRCHB4AASAeDh8MCEdfGgAUShZXEA0XAwYjAx8JCUcCEgZEGlVRBhoVARslBhkLEV1CFFwURVFJUlIRBwcZGAAXaEJZAUQQABZQSlBfSllAVUkIHAZKBldfRVATGg4WHQkXNUpfURRTBgA6NhEABERTTlVJCBwGSgZZQ0lCUl5PRBoZByldRlMKRVdJR15DXikHBR8AOhQDGiBXGQAALVxBQyAIABYAZxwFSnAUHxYXL1BDRksfEAd0VUADWgYsIRMCGU1cS05JRRpEWQ1TGwBHSFIpT0Y0TklFGlZfAUMHGgsXA1B
@bitmori
bitmori / md_with_Admonition.md
Last active December 25, 2019 06:03
VSCode当作笔记本
@bitmori
bitmori / create_symlink_osx
Created December 25, 2015 05:59
how to create symlink on OS X
@bitmori
bitmori / freebsd_xfce.md
Last active November 26, 2015 16:05
steps of freebsd + xfce
  1. install freebsd, reboot
  2. login as root/admin
  3. $ freebsd-update fetch && freebsd-update install
  4. $ portsnap fetch
  5. $ portsnap extract
  6. $ portsnap update

$ pkg install sudo nano

$ pkg install xfce

@bitmori
bitmori / gist:671e77e4f2f9ae4a73fb
Last active November 5, 2015 05:11
useful commands
# upgrade node
$ brew update
$ brew doctor
$ brew upgrade node
@bitmori
bitmori / pbcopy_pbpaste.txt
Created November 5, 2015 04:43
pbcopy & pbpaste
# output -> clipboard
$ ls | pbcopy
# clipboard -> save to file
$ pbpaste > ls.txt
# transform contents in clipboard. rot13:
$ pbpaste | tr 'a-zA-Z' 'n-za-mN-ZA-M' | pbcopy
@bitmori
bitmori / terminal.txt
Created November 1, 2015 17:17
create repo github pages
$ git clone git@github.com:neonmori/repo.git
$ cd repo
$ git checkout --orphan gh-pages
# Creates our branch, without any parents (it's an orphan!)
# Switched to a new branch 'gh-pages'
$ git rm -rf .
# Remove all files from the old working tree
# rm 'blah blah'