Skip to content

Instantly share code, notes, and snippets.


Joker_ JokerQyou

View GitHub Profile
fernandoherreradelasheras /
Created Feb 26, 2022
Smart video cutter with minimal transcoding using ffmpg
# 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 /
Last active Aug 8, 2022 — forked from eddiewebb/
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 and press CMD-/ and start typing.

Fast Search

leplay / accounts-assets.bean
Last active Dec 8, 2020
Beancount + Costflow
View accounts-assets.bean
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 /
Last active May 15, 2019
reinvent the gunicorn
import os
import signal
import socket
import sys
import time
def be_a_worker(sock):
"""将当前进程变成一个 worker
bmaupin /
Last active Aug 12, 2022
Comparison of open-source SSO implementations

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 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

tianyuf / baidu-as-a-network-utility.css
Created May 14, 2016
BaaN: Baidu as a Network Utility - 百度的实用主义方法论.
View baidu-as-a-network-utility.css
@-moz-document domain("") {
body {
display: none;
html {
margin: 30px;
html::after {
View cmus
# kill the media key program on exit
trap 'kill $(jobs -p)' EXIT
# prevent iTunes from capturing media keys
launchctl unload -w /System/Library/LaunchAgents/ 2>/dev/null
# launch the media key program in the background
(cmus-media-keys) &