Skip to content

Instantly share code, notes, and snippets.

View aben20807's full-sized avatar
💭
OuO

Huang, Po-Hsuan aben20807

💭
OuO
View GitHub Profile
@aben20807
aben20807 / mvc.sh
Last active July 18, 2022 06:28
My Video Converter: Convert unplayable mp4 to playable mp4 by ffmpeg
#!/bin/env bash
# My Video Converter
# Convert unplayable mp4 to playable mp4
# File with spaces. Ref: https://unix.stackexchange.com/a/9499
find . -maxdepth 1 -type f \( -iname "*.mp4" ! -iname "*.new.mp4" \) -print0 | while IFS= read -r -d '' file; do
ext="${file##*.}"
filename="${file%.*}"
new_file="${filename}.new.${ext}"
@aben20807
aben20807 / github.css
Last active April 10, 2023 11:11 — forked from tuzz/github.css
Github Markdown Stylesheet (Modified from https://gist.github.com/tuzz/3331384)
/*
Copyright (c) 2017 Chris Patuzzo
https://twitter.com/chrispatuzzo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@aben20807
aben20807 / phd_points.py
Last active January 5, 2023 08:47
成大資工博士畢業點數計算
from typing import Union
def cal(L: Union[str, int], i: int, N: int) -> float:
global cnt
cnt += 1
assert L == "A" or L == "B" or L == "C" or isinstance(L, int)
# T: A6;B4;C2
T = 6 - 2 * (ord(L) - ord("A")) if isinstance(L, str) else L
d = sum([2 ** (-j) for j in range(1, N + 1)])
@aben20807
aben20807 / hw1.c
Last active January 23, 2016 07:38
/********************************************************************************
Report:hw1
Author: F74046284 黃柏瑄
Class: 乙班
Description:指令列後直接接上二個參數,可將參數一檔案裡的內容複製至參數二的檔案裡。
*********************************************************************************/
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{