Click an image below to view the video on Youtube.
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
# 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 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 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 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 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 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); |
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
// So that we can call .apply() on a new constructor | |
var construct = function (constructor, args) { | |
function F() { | |
return constructor.apply(this, args); | |
} | |
F.prototype = constructor.prototype; | |
return new F(); | |
}; | |
// Constructor for a new THREE thing... |
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 gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var cssc = require('gulp-css-condense'); | |
var postcss = require('gulp-postcss'); | |
var pixrem = require('gulp-pixrem'); | |
// Process Sass to CSS | |
gulp.task('sass', function () { | |
return gulp.src('./sass/**/*.scss') | |
.pipe(sass().on('error', sass.logError)) |
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
@-moz-document domain("www.theinquirer.net") { | |
@media screen { | |
#content-left-main { | |
background: #fff; | |
} | |
#leftcol, | |
#rightcol, | |
#centercol, | |
.inq_left_block, | |
.inq_right_block { |