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
ffmpeg -framerate 50 -pattern_type glob -i '*.png' -vf "pad=1920:1080:0:0" output50fps.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
youtube-dl --write-all-thumbnails --skip-download "<VIDEO_URL>" |
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
let getKeys = (obj) => Object.keys(obj) | |
let isObject = (obj) => obj && typeof obj == 'object' && !obj.length | |
let isArray = (arr) => Array.isArray(arr) | |
let isEmptyObject = (obj) => isObject(obj) && !Object.keys(obj).length | |
let isEmptyArray = (arr) => isArray(arr) && !arr.length | |
let isBanned = (val) => bannedKeys.indexOf(val) !== -1 |
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
db.getCollection('users').aggregate([ | |
{$project: {'timeline': 1}}, | |
{$unwind: '$timeline'}, | |
{$sort: {'timeline.retweet_count': -1}} | |
]) | |
/* | |
expected schema: | |
{ |
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
db.getCollection('users').aggregate([ | |
{$project: {'timeline':1}}, | |
{$group: {_id: '$timeline.id', count: {$sum:1}}} | |
]) |
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
mpv link_to_youtube_vid --no-video |
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
/** @jsx React.createElement */ | |
/* ^ JS bin needs this or it will start complaining */ | |
/* Redux code to create a counter. Needs a div with ID "app" to start working */ | |
const counter = (state = 0, action) => { | |
switch(action.type) { | |
case 'INCREMENT': | |
return state + 1 | |
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
var users = ['Cow Mask', 'Horse JS'] | |
$('.context, strong.fullname').each(function(i, authorField) { | |
if( $(authorField).text().match(new RegExp(users.join('|'))) ) $(authorField).closest('li').remove() | |
}) |
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
// Put this in the console; need to be logged in. Output will be a list of gifs. If not, change the extension replacer below. | |
// 808px is needed for scrolltop to be equal to clientheight even after the page has been scrolled all the way to the bottom | |
var ci, images = []; | |
ci = setInterval(function() { | |
if(document.body.scrollTop >= (document.querySelector('div.App').clientHeight - 808)) { | |
console.log('shutting down...') | |
clearInterval(ci) |