Skip to content

Instantly share code, notes, and snippets.

View oakhope's full-sized avatar
😄

Bruce oakhope

😄
View GitHub Profile
@oakhope
oakhope / ffmpeg GIF to MP4.MD
Created July 15, 2024 08:59 — forked from gvoze32/ffmpeg GIF to MP4.MD
Convert animated GIF to MP4 using ffmpeg in terminal.

To convert animation GIF to MP4 by ffmpeg, use the following command

ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4

Description

movflags – This option optimizes the structure of the MP4 file so the browser can load it as quickly as possible.

pix_fmt – MP4 videos store pixels in different formats. We include this option to specify a specific format which has maximum compatibility across all browsers.

@oakhope
oakhope / flask-sec-doc.md
Created June 28, 2024 05:52 — forked from aqt01/flask-sec-doc.md
Flask security documentation
! function() {
"use strict";
function e(e) {
(console.error ? console.error : console.log).call(console, e)
}
function t(e) {
return l.innerHTML = '<a href="' + e.replace(/"/g, "&quot;") + '"></a>', l.childNodes[0].getAttribute("href")
}
Registered Name: https://zhile.io
License Key: 48891cf209c6d32bf4
@oakhope
oakhope / Capistrano.md
Created April 27, 2021 07:48 — forked from zxzsaga/Capistrano.md
Capistrano 使用

使用版本为 capistrano 3.3.5 , Capistrano 安装方法自行 Google.

项目中初始化 Capistrano

cap install

会生成如下目录文件:

├── Capfile   
├── config   
│   ├── deploy   
@oakhope
oakhope / README.md
Created March 30, 2021 08:22 — forked from ilblog/README.md
Create mp4 video from set of images in the browser client side, using ffmpeg.js in worker thread
@oakhope
oakhope / waitForKeyElements.js
Created March 15, 2021 05:33 — forked from BrockA/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@oakhope
oakhope / ajaxListener.js
Created March 12, 2021 02:19 — forked from icodejs/ajaxListener.js
JS: Listen to ajax calls from Javascript
var open = window.XMLHttpRequest.prototype.open,
send = window.XMLHttpRequest.prototype.send,
onReadyStateChange;
function openReplacement(method, url, async, user, password) {
var syncMode = async !== false ? 'async' : 'sync';
console.warn(
'Preparing ' +
syncMode +
' HTTP request : ' +
@oakhope
oakhope / creative-cloud-disable.md
Created August 30, 2017 13:42 — forked from andreibosco/creative-cloud-disable.md
disable creative cloud startup on mac
@oakhope
oakhope / hosts
Created August 29, 2017 03:26 — forked from consti/hosts
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost