Skip to content

Instantly share code, notes, and snippets.

View FlandreDaisuki's full-sized avatar
🌈
世界にバグは不要です

Chun-Hao Lien FlandreDaisuki

🌈
世界にバグは不要です
View GitHub Profile

加入ass字幕

ffmpeg -i $VIDEO_FILE -vf ass=$ASS_FILE $OUTPUT_FILE

@FlandreDaisuki
FlandreDaisuki / hosts-nocoin.sh
Created February 2, 2018 12:54
cron with root
#!/bin/sh
USERNAME='flandre'
cd /root && \
wget https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt && \
cat localhosts hosts.txt > /etc/hosts && \
rm hosts.txt* && \
sudo -u $USERNAME notify-send -t 30000 '/etc/hosts update'
@FlandreDaisuki
FlandreDaisuki / m3u8-to-mp4.md
Created January 26, 2018 17:01 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@FlandreDaisuki
FlandreDaisuki / cs.py
Created January 18, 2018 10:16 — forked from myano/cs.py
Quick example of ncurses in Python!
#!/usr/bin/env python
import curses
import curses.textpad
import time
stdscr = curses.initscr()
#curses.noecho()
#curses.echo()
@font-face {
font-family: japarifont;
src: url(https://cdn.rawgit.com/aratama/kemonogen/417db197/docs/japarifont.woff)
format('woff');
font-weight: normal;
font-style: normal;
}
.name {
font-size: 16px;
@FlandreDaisuki
FlandreDaisuki / dom_load_order.user.js
Created October 22, 2017 10:48 — forked from ipcjs/dom_load_order.user.js
Dom相关事件的执行顺序
// ==UserScript==
// @name New Userscript
// @namespace https://github.com/ipcjs
// @version 0.0.1
// @description try to take over the world!
// @author ipcjs
// @match http://bangumi.bilibili.com/anime/5788/play*
// @grant none
// @run-at document-start
// ==/UserScript==
@FlandreDaisuki
FlandreDaisuki / 動畫瘋.stylish.css
Created March 20, 2017 18:08
筆電銀幕放大影片至符合內高
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix("https://ani.gamer.com.tw/animeVideo.php") {
@media screen and (max-width: 1366px) {
#ani_video.vjs-playing:not(.vjs-fullscreen) {
position: fixed;
top: 0;
left: 0;
max-height: 100vh;
max-width: 100vw;
@FlandreDaisuki
FlandreDaisuki / GM_download_polyfill.js
Created February 18, 2017 02:32 — forked from ccloli/GM_download_polyfill.js
GM_download polyfill, a polyfill to make your userscript supports GM_download
/*
* GM_download polyfill
*
* @description A polyfill to make your userscript supports GM_download
* @author ccloli
* @version 1.0
*/
// to use this polyfill, you must add "@grant GM_xmlhttpRequest" at userscript metadata block
@FlandreDaisuki
FlandreDaisuki / index.js
Created November 10, 2016 07:20 — forked from edokeh/index.js
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
/*
* 存成 ~/桌面/hello.cpp
*/
#include <GL/glut.h>
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glutWireTeapot(0.5);