This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p ani ani-s | |
input_file="$1" | |
fix_factor="${2:-1}" | |
# Get the duration of the video | |
duration=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$input_file") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import re | |
import sys | |
import argparse | |
def modify(path, args): | |
print("DO: ", path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function 测试UAC | |
{ | |
[OutputType([bool])] | |
param() | |
process { | |
[Security.Principal.WindowsPrincipal]$用户 = [Security.Principal.WindowsIdentity]::GetCurrent(); | |
return $用户.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Github Widescreen Fix | |
// @namespace http://tampermonkey.net/ | |
// @updateURL https://gist.github.com/fffonion/4f7bd4511ca1b6798ec422ae37fd5376/raw/github-widescreen.user.js | |
// @downloadURL https://gist.github.com/fffonion/4f7bd4511ca1b6798ec422ae37fd5376/raw/github-widescreen.user.js | |
// @version 0.2 | |
// @description try to take over the world! | |
// @author You | |
// @match https://github.com/*/*/actions/runs/*/job/* | |
// @match https://github.com/*/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[global] | |
index-url = https://pypi.tuna.tsinghua.edu.cn/simple | |
extra-index-url = https://pypi.org/simple | |
https://download.pytorch.org/whl/cu113 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
f="$1" | |
IFS=$'\r\n' | |
filename="${f%.*}" | |
bf=$(basename "$filename") | |
options=() | |
moptions=() | |
for s in $(ffprobe "$f" -show_entries stream=index,codec_type,codec_name:stream_tags=language,title -of compact 2>/dev/null|grep "codec_type=subtitle"); do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/lib_ffi.c b/src/lib_ffi.c | |
index a29014e5..268c948c 100644 | |
--- a/src/lib_ffi.c | |
+++ b/src/lib_ffi.c | |
@@ -494,6 +494,7 @@ LJLIB_CF(ffi_new) LJLIB_REC(.) | |
{ | |
CTState *cts = ctype_cts(L); | |
CTypeID id = ffi_checkctype(L, cts, NULL); | |
+ printf("my type is %d\n", id); | |
CType *ct = ctype_raw(cts, id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <BLEDevice.h> | |
BLEClient *pClient; | |
BLEScan *pBLEScan; | |
#define SCAN_TIME 10 // seconds | |
bool connected = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import time | |
def rfc822(s): | |
_ = re.findall("[A-z][a-z]+,\s*([^\+G]+)(?:$|\s([\+\-]*)(\d+|GMT))", s) | |
if not s: | |
print("%s is not RFC822 Date" % s) | |
return 0 | |
dt, sgn, tz = _[0] | |
if tz == "GMT": |
NewerOlder