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
# https://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality | |
ffmpeg -y -ss 0 -t 12 -i input.mp4 -vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png | |
ffmpeg -ss 0 -t 12 -i input.mp4 -i palette.png -filter_complex "fps=10,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif |
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
# -i Input | |
# -ss Starting timestamp HH:MM:SS.xxx | |
# -t duration | |
# https://superuser.com/questions/138331/using-ffmpeg-to-cut-up-video | |
# https://stackoverflow.com/questions/18444194/cutting-the-videos-based-on-start-and-end-time-using-ffmpeg | |
# -c copy | |
ffmpeg -ss 00:00:05 -i input.mp4 -t 00:00:15 output.mp4 |
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
launchctl remove com.paragon-software.ntfs.notification-agent | |
sudo launchctl unload -w /Library/LaunchDaemons/com.paragon-software.installer.plist | |
sudo launchctl unload -w /Library/LaunchDaemons/com.paragon-software.ntfsd.plist | |
sudo launchctl unload -w /Library/LaunchDaemons/com.paragon-software.ntfs.loader.plist |
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
# Append to /etc/fstab | |
LABEL=DRIVENAME none ntfs rw,auto,nobrowse |
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
var $head = $('.entry h2.orth'); | |
var $placeholder = $('<div></div>'); | |
var nodes = $head[0].children; // Raw children nodes | |
// Strange enough this is an object! | |
// To iterate correctly without dropping nodes | |
// It must be converted to an array | |
_.toArray(nodes).forEach(child => { | |
if (child.type === 'text') { |
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
const fs = require('fs'); | |
const path = require('path'); | |
const readline = require('readline'); | |
const FILE_PATH = path.resolve(__dirname, '../data/ingest_test.txt'); | |
const stream = fs.createReadStream(FILE_PATH); | |
const interface = readline.createInterface({ input: stream }); | |
interface.on('line', processLine); | |
interface.on('close', () => console.log("\nDone!")); |
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
require('font-awesome/css/font-awesome.css'); | |
document.body.innerHTML = '<i class="fa fa-fw fa-question"></i>'; |
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
<a href="data:text/plain;charset=utf-8;base64,Zm9vIGJhcg==">Data as URI</a> |
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
var element = $('#drop-area')[0]; | |
var callback = function onFileDrop() { | |
var filenames = event.target.result; | |
}; | |
function droppable(element, callback) { | |
element.addEventListener('dragover', function onDrag(event) { | |
event.stopPropagation(); | |
event.preventDefault(); |
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
// Add full screen wrapper | |
.box { | |
top: 50%; | |
left: 50%; | |
margin: 0; | |
position: absolute; | |
transform: translate(-50%, -50%); | |
} |