Skip to content

Instantly share code, notes, and snippets.

View CroMarmot's full-sized avatar
🐀

陈鼫RWHTYFZ CroMarmot

🐀
View GitHub Profile
@CroMarmot
CroMarmot / blackscreen.py
Last active January 15, 2024 23:09
blackscreen
# apt install python3-tk
# pip install screeninfo
# not working https://chat.openai.com/share/09bf5a5e-5a24-443c-ad25-a30e09253da4
# https://chat.openai.com/share/bcdf31c6-fffa-43a7-9982-032f415fc016
import sys
import tkinter as tk
from screeninfo import get_monitors
# 获取所有显示器
monitors = get_monitors()
@CroMarmot
CroMarmot / For Mac 4.2.6 unlimited trial.md
Created December 4, 2023 04:42 — forked from rise-worlds/For Mac 4.2.6 unlimited trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+u BCompare : touch BCompare && chmod a+u BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@CroMarmot
CroMarmot / douyu_ygb.js
Last active February 16, 2023 23:57
douyu_ygb.js
// ==UserScript==
// @name 斗鱼自动送荧光棒
// @namespace http://tampermonkey.net/
// @version 0.1
// @description douyu斗鱼自动荧光棒,配置房间id
// @author cromarmot
// @match *://douyu.com/*
// @match *://www.douyu.com/*
// @exclude *://douyu.com/?*
// @icon https://www.douyu.com/favicon.ico
@CroMarmot
CroMarmot / ffplay.desktop
Last active October 8, 2022 21:24
/usr/share/applications/ffplay.desktop
[Desktop Entry]
Name=ffplay
Exec=/usr/bin/ffplay %U
Type=Application
MimeType=text/plain;
NoDisplay=true
X-GNOME-UsesNotifications=false
#X-RHEL-AliasOf=org.gnome.gedit
@CroMarmot
CroMarmot / remap-capslock-to-control-win10.md
Last active October 18, 2021 02:24
remap-capslock-to-control-win10.md

.reg file

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
@CroMarmot
CroMarmot / fingerprintfix.ps1
Created August 16, 2021 08:53
FuckWin10FingerprintNotWorking
# https://answers.microsoft.com/zh-hans/windows/forum/all/%E6%9B%B4%E6%96%B0win10%E5%90%8E%E6%8C%87%E7%BA%B9/7fc55349-7234-4fd0-a3c1-04fcf20e2aaa?auth=1
# https://superuser.com/a/532109/679805
param([switch]$Elevated)
function Test-Admin {
$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
}
// prepare
// npm i express
const express = require('express')
const app = express()
const port = 3000
app.all('*', (req, res) => {
console.log(req.originalUrl);
res.send(`Your req path:[${req.originalUrl}]`)
})

keytool -list -v -keystore ./demo.jks

keytool -export -alias "上面的alias" -keystore ./demo.jks | base64

openssl x509 -inform der -in ./demo.cer -pubkey -noout > out.pem

package main
// https://go2goplay.golang.org/p/ADJAyjhawh-
// https://play.golang.org/p/ADJAyjhawh-
import (
"fmt"
)
func Map[type T, U, V](f func(T) V) func(reducing func(U, V) U) func(U, T) U {
@CroMarmot
CroMarmot / DisableImplicitCasts.cpp
Last active June 19, 2020 08:16
Disable Implicit Casts
#include <iostream>
using namespace std;
class CStudent
{
public:
CStudent() {};
~CStudent() {};
};
class CTeacher
{