Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
#
# Dumb script to dump (some) of bcache status
# Copyright 2013 Darrick J. Wong. All rights reserved.
#
# This file is part of Bcache. Bcache is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@mattparker
mattparker / installing gcov and ltp for php.md
Last active December 3, 2023 05:08
trying to compile php with gcov
vagrant@php7dev:~/php-src$ ./configure --enable-gcov --prefix=/usr/local/php70-gcov

gives, eventually:

configure: error: To enable code coverage reporting you must have LTP installed
@joshschmelzle
joshschmelzle / remap-capslock-to-control-win10.md
Last active May 13, 2024 01:55
Remap Caps Lock to Control on Windows 10

Ways to remap caps lock to control on Windows 10

These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).

Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.

Approach 1. Manually through regedit

Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map.

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 30, 2024 12:19
crack activate Office on mac with license file
#!/bin/sh
import(){
img_name=$1
vm_id=$2
storage=${3:-local-lvm}
vmdisk_name=img2kvm_temp.qcow2
if [ "${img_name##*.}"x = "gz"x ];then
@chenshengzhi
chenshengzhi / git_ssh_proxy.md
Last active June 2, 2024 04:01
git ssh 代理设置

仅为 GitHub 设置代理

git 代理

设置 git config --global http.https://github.com.proxy socks5://127.0.0.1:1086
设置完成后, ~/.gitconfig 文件中会增加以下条目:

[http "https://github.com"]
    proxy = socks5://127.0.0.1:1086
@Drag13
Drag13 / v8-debug-flags
Last active January 5, 2024 03:42
v8 engine flags for DEBUG version v9.4.143
Options:
--abort-on-contradictory-flags (Disallow flags or implications overriding each other.)
type: bool default: true
--allow-overwriting-for-next-flag (temporary disable flag contradiction to allow overwriting just the next flag)
type: bool default: false
--use-strict (enforce strict mode)
type: bool default: false
--harmony (enable all completed harmony features)
type: bool default: false
--harmony-shipping (enable all shipped harmony features)
@roaldnefs
roaldnefs / mac-docker-gui.txt
Created December 22, 2019 10:27
Running GUI application in Docker on MacOS
# Install XQuartz
brew cask install xquartz
# Restart MacOS
# Open XQuartz
open -a XQuartz
# Ensure the "Allow connections from network clients" option in Preferences >> Security is turned on