Skip to content

Instantly share code, notes, and snippets.

View JokerQyou's full-sized avatar

Joker_ JokerQyou

View GitHub Profile
@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 March 22, 2024 07:02 — forked from eddiewebb/readme.md
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 craigmod.com and press CMD-/ and start typing.

Fast Search

@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 April 11, 2024 09:36
Comparison of some open-source SSO implementations

ⓘ This list is not meant to be exhaustive and is not guaranteed to be maintained. See the comments for updates and alternative options.

(Items in bold indicate possible concerns)

Keycloak WSO2 Identity Server Gluu CAS OpenAM Shibboleth IdP
OpenID Connect/OAuth support yes yes yes yes yes yes
Multi-factor authentication yes yes yes yes yes yes
Admin UI yes yes yes yes yes no
OpenJDK support yes yes partial² yes
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active April 23, 2024 21:05
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 February 12, 2024 08:46
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

@tianyuf
tianyuf / baidu-as-a-network-utility.css
Created May 14, 2016 15:03
BaaN: Baidu as a Network Utility - 百度的实用主义方法论.
@-moz-document domain("baidu.com") {
body {
display: none;
}
html {
margin: 30px;
}
html::after {