Click an image below to view the video on Youtube.
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
const fs = require('fs'); | |
const glob = require('glob'); | |
const fm = require('front-matter'); | |
const path = require('path'); | |
const write = require('write'); | |
glob("!(node_modules)/**/*.md", {}, (err, files) => { | |
files.forEach((file) => { | |
fs.readFile(file, 'utf8', (err, data) => { | |
if (err) throw err; |
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
// ==UserScript== | |
// @name Close and open url | |
// @namespace https://omgmog.net | |
// @version 0.1 | |
// @description close issue and open first link from issue | |
// @author Max Glenister | |
// @match https://github.com/omgmog/meta-ifttt-reading-list/issues/* | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Open all the issues | |
// @namespace https://blog.omgmog.net/ | |
// @version 0.1 | |
// @description Opens all of the issues on the current page in new windows | |
// @author You | |
// @match https://github.com/*/*/issues | |
// @grant none | |
// ==/UserScript== |
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
# Convert mp3 files to wav | |
# Usage: for file in *.mp3; do mp3towav $file; done | |
mp3towav() { | |
afconvert -f WAVE -d LEI16@44100 "$1" | |
} | |
# Trim silence from start/end of files | |
# Usage: for file in *.wav; do trimsilence $file; done | |
trimsilence() { | |
mkdir -p trimmed |
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 arr = []; | |
arr[100] = 'Foo'; | |
// Outputs lots of 'undefined' and then the value for arr[100] | |
for (var i=0;i<arr.length;i++) { | |
console.log(arr[i]); | |
} | |
// Outputs just the indexes with a value defined |
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 imgDefer = document.getElementsByTagName('img'); | |
for (var i=0; i<imgDefer.length; i++) { | |
if(imgDefer[i].getAttribute('data-src')) { | |
imgDefer[i].setAttribute('src',imgDefer[i].getAttribute('data-src')); | |
} | |
} |
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
#body .watch-stage-mode .player-height { | |
height: 760px; | |
} | |
#body .html5-video-player { | |
overflow: visible!important; | |
} | |
#body .html5-video-player video { | |
width: 1280px!important; | |
height: 720px!important; | |
left: -213px!important; |
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 postcss = require('postcss'); | |
module.exports = postcss.plugin('postcss-nope', function (opts) { | |
opts = opts || {}; | |
return function (css) { | |
css.eachDecl(function transformDecl(decl) { | |
decl.value = decl.value.replace('nope', 'none'); | |
}); | |
}; |
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
// While viewing the page, run this from the developer console. | |
var emojislist=[]; | |
for (var i = 0; i<emojis.length;i++) { | |
var text = emojis[i].querySelectorAll('td:nth-child(2)')[0].innerText; | |
var img = emojis[i].querySelectorAll('td:nth-child(1) span')[0].getAttribute('data-original'); | |
emojislist.push({text:text,img:img}); | |
} | |
console.log(emojislist); |