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 -e | |
vectorize() { | |
input="$(realpath "$1")" | |
output="$(realpath "$2")" | |
mkdir -p _vectorize | |
cd _vectorize | |
echo "1. pdf to pages" |
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 python | |
def decode_buf(ciphertext): | |
from Crypto.Protocol.KDF import PBKDF2 | |
(KEY_SIZE, IV_SIZE) = (256 // 8, 128 // 8) | |
key_iv = PBKDF2("4ZpHznL4ELiAiZEXpAloFPA7sO4NqVLLd8qavZ8D", b"vxZIH70vLr9i8pymHC0U", dkLen=KEY_SIZE + IV_SIZE) | |
(key, iv) = (key_iv[:KEY_SIZE], key_iv[KEY_SIZE:]) | |
from Crypto.Cipher import AES |
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
# Maintainer: Alex Szczuczko <[email protected]> | |
# Contributor: Marcelo Alaniz <[email protected]> Hugh Wang <[email protected]> | |
pkgname=nusmv | |
_pkgname=NuSMV | |
pkgver=2.6.0 | |
pkgrel=2 | |
pkgdesc="A new symbolic model checker" | |
arch=('i686' 'x86_64') | |
url="http://nusmv.fbk.eu/index.html" |
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 <cassert> | |
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#define ATTR_WEAK __attribute__((weak)) | |
extern "C" { | |
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size); |
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
pkg/ | |
src/ | |
understand-bin-*.pkg.* | |
Understand-*.tgz | |
.SRCINFO |
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 | |
# Screen brightness and color temperature | |
function set-brightness-i2c() { | |
sudo ddcutil -l "$1" setvcp 0x10 "$2" & | |
} | |
function set-brightness-builtin() { | |
xbacklight -set "$1" -time 0 |
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/sh | |
set -u | |
function towav { | |
ffmpeg -i "$1" -f wav "raw.wav" | |
} | |
function conv() { | |
fullname="$1" | |
bitrate="$2" |
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
# -*- mode: snippet -*- | |
#name : mail | |
#key : mail | |
#author : Hugh Wang | |
# -- | |
${1:尊敬的 XXX} | |
您好。 | |
$0 |
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
(with-eval-after-load 'org | |
(setq start-week 37) | |
(advice-add 'org-read-date-analyze :around | |
(lambda (original-fun ans org-def org-defdecode) | |
(funcall original-fun | |
(if (string-match "^s\\([0-9]+\\)\\(.*\\)" ans) | |
(concat "w" | |
(number-to-string (+ start-week | |
(string-to-number (match-string 1 ans)))) | |
(match-string 2 ans)) |
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 python | |
import bs4 | |
def convert_element(lines, level=1): | |
result = '' | |
for line in lines: | |
if not isinstance(line, bs4.element.Tag) or \ | |
line.name != 'outline': | |
continue |
NewerOlder