This file contains hidden or 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
| # Reference: https://github.com/macvim-dev/macvim/wiki/building | |
| class Macvim < Formula | |
| desc "GUI for vim, made for macOS" | |
| homepage "https://github.com/macvim-dev/macvim" | |
| head "https://github.com/s4y/macvim.git", :branch => "stateful-render" | |
| depends_on :xcode => :build | |
| depends_on "cscope" | |
| depends_on "lua" | |
| depends_on "python" |
This file contains hidden or 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 | |
| # See https://www.downtowndougbrown.com/2013/06/legacy-apple-backup-file-format-on-floppy-disks/ | |
| import os | |
| import pathlib | |
| import struct | |
| import sys | |
| f = open(sys.argv[1], 'rb') |
This file contains hidden or 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 | |
| if [[ $# < 1 ]]; then | |
| echo "usage: $0 input.mov [ffmpeg_opts]..." 1>&2 | |
| exit 1 | |
| fi | |
| infile="$1" | |
| shift | |
| outfile="${infile%.*}.mp4" |
This file contains hidden or 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
| for f in *.mkv; do ffmpeg -hide_banner -y -i "$f" -c copy -c:s mov_text -map 0:v -map 0:a -map 0:a -map s -ac:a:0 2 -c:a:0 aac -disposition:a:0 none -disposition:a:1 default -movflags +faststart "${f%.mkv}.mp4" || break; done |
This file contains hidden or 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 | |
| from urllib.request import urlopen, urlretrieve | |
| from urllib.error import HTTPError | |
| import json | |
| import os | |
| import sys | |
| import time | |
| def update(thread): |
This file contains hidden or 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
| youtube-dl -o htba VaL-KP6QOUI && (textargs='borderw=3:font=Arial Black:fontcolor=white:fontsize=40:x=40:y=h-lh-20' ; ffmpeg -ss 38 -t 2.85 -i htba.* -lavfi 'scale=502:-1 , drawtext='"$textargs"':enable=between(t\,1.5\,1.8):text=I , drawtext='"$textargs"':enable=between(t\,1.8\,2.1):text=I RESPECT , drawtext='"$textargs"':enable=gte(t\,2.1):text=I RESPECT WOMEN , split=3[mp4out][s1][s2] ; [s1]palettegen[p], [s2]fifo[s2], [s2][p]paletteuse[gifout]' -map '[mp4out]' -pix_fmt yuv420p -map 0:1 i_respect_women.mp4 -map '[gifout]' i_respect_women.gif) |
This file contains hidden or 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 <CoreFoundation/CoreFoundation.h> | |
| #include <IOKit/IOKitLib.h> | |
| typedef struct { | |
| char key[4]; | |
| char ignored[24]; | |
| uint32_t size; | |
| char ignored2[10]; | |
| char cmd; | |
| char ignored3[5]; |
This file contains hidden or 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 <inttypes.h> | |
| #include <stdlib.h> | |
| typedef enum { | |
| UTF8_OK = 0, | |
| UTF8_ERROR = 4, | |
| } utf8_decode_state_t; | |
| typedef struct { | |
| utf8_decode_state_t state; |
This file contains hidden or 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 <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| int main() { | |
| for (;;) { | |
| char* line = NULL; | |
| size_t cap; | |
| ssize_t sz; |
This file contains hidden or 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 <inttypes.h> | |
| typedef enum { | |
| UTF8_OK = 0, | |
| UTF8_ERROR = 4, | |
| } utf8_decode_state_t; | |
| typedef struct { | |
| utf8_decode_state_t state; | |
| uint32_t codepoint; |