Skip to content

Instantly share code, notes, and snippets.

View JokerQyou's full-sized avatar

Joker_ JokerQyou

View GitHub Profile
@stephancasas
stephancasas / sonoma-text-insertion-point-downgrade.jxa.js
Created October 7, 2023 02:58
Disable Sonoma Text Insertion Point ("Cursor" / "Caret")
#!/usr/bin/env osascript -l JavaScript
const App = Application.currentApplication();
App.includeStandardAdditions = true;
const kCFPrefsFeatureFlagsDir = '/Library/Preferences/FeatureFlags/Domain';
const kCFPrefsFeatureEnabledKey = 'Enabled';
const kUIKitDomainPrefsTemporaryPath = '/tmp/UIKit.plist';
const kUIKitRedesignedTextCursorKey = 'redesigned_text_cursor';
@fernandoherreradelasheras
fernandoherreradelasheras / smart-video-cutter.sh
Created February 26, 2022 17:01
Smart video cutter with minimal transcoding using ffmpg
#!/usr/bin/bash
#
# Cut a fragment of a video with the minimal possible re-encoding.
# If the new start point is not a key frame it reencodes the video
# from that point until the frame before a new keyframe. The remaining
# part is copied as passthrough and both fragments are concatenated
#
# In order to make the video streams compatible we use the same codec
# and bitrate. This works fine with h264. No idea about other codecs
#!/usr/bin/env python
import math
import sys
from moviepy.editor import AudioClip, VideoFileClip, concatenate_videoclips
# Get average RGB of part of a frame. Frame is H * W * 3 (rgb)
# Assumes x1 < x2, y1 < y2
@cmod
cmod / hugofastsearch.md
Last active May 15, 2025 12:01 — forked from eddiewebb/readme.md
Fast, instant client side search for Hugo static site generator
@leplay
leplay / accounts-assets.bean
Last active October 12, 2023 05:16
Beancount + Costflow
2019-01-01 open Assets:CN:Cash
2019-01-01 open Assets:CN:Alipay ; 支付宝余额
2019-01-01 open Assets:CN:Wechat ; 微信零钱
2019-01-01 open Assets:CN:DebitCard:CMB ; 招商银行储蓄卡
2019-01-01 open Assets:CN:DebitCard:BOC ; 中国银行储蓄卡
2019-01-01 open Assets:CN:FinTech:LCT ; 微信理财通
2019-01-01 open Assets:CN:FinTech:ZZY ; 招行朝朝盈
2019-01-01 open Assets:CN:FinTech:YEB ; 支付宝余额宝
@cosven
cosven / gunicorn_demo.py
Last active May 15, 2019 09:53
reinvent the gunicorn
import os
import signal
import socket
import sys
import time
def be_a_worker(sock):
"""将当前进程变成一个 worker
@bmaupin
bmaupin / open-source-sso.md
Last active June 15, 2025 20:59
Comparison of some open-source SSO implementations

⚠️ This is not maintained. Feel free to check comments and/or forks for more current options.

Background

This was created years ago; at the time I'd been a Shibboleth admin for nearly a decade but we needed something that could handle OIDC/OAuth and that explicitly supported OpenJDK. After a lot of investigation, I really liked Keycloak/Red Hat Single Sign-On. More details here: Gluu vs keycloack vs wso2 identity management

Comparison

(Items in bold indicate possible concerns)

@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active June 26, 2025 13:39
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@eddiewebb
eddiewebb / readme.md
Last active May 12, 2025 09:35
Hugo JS Searching with Fuse.js

WannaCry|WannaDecrypt0r NSA-Cyberweapon-Powered Ransomware Worm

  • Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
  • Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
  • Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
  • Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
  • Kill switch: If the website www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).

update: A minor variant of the viru