Skip to content

Instantly share code, notes, and snippets.

View dvdrtrgn's full-sized avatar
🐢
nibbling

David dvdrtrgn

🐢
nibbling
View GitHub Profile
@dvdrtrgn
dvdrtrgn / itunes_match_tips.txt
Created December 26, 2011 17:11 — forked from rmhall/itunes_match_tips.txt
iTunes Match tips
My iTunes Match Track upgrading and process info:
If you have less than 25,000 tracks:
1. First let iTunes Match do its things and find all possible matches in your
library and finish uploading any non-matching tracks.
2. Once its done, make a new Smart Playlist (I made a folder for all my Smart
iTunes Match Related Playlists)
@dvdrtrgn
dvdrtrgn / index.js
Last active May 11, 2022 02:45
Extended Class order of inits
#!/usr/bin/env node
let C = console;
class C0 {
constructor() {
C.log(`C0 construct’d`);
C.log(`C0 this’d`, this);
}
foo = (() => C.log(`C0 init`))() || `C0 init`;

Keybase proof

I hereby claim:

  • I am dvdrtrgn on github.
  • I am dvdrtrgn (https://keybase.io/dvdrtrgn) on keybase.
  • I have a public key ASBRWDh7m9c_XFjIT-wRp8IMr3LjbT_xLlH3uWYcDQiTIwo

To claim this, I am signing this object:

@dvdrtrgn
dvdrtrgn / dematrix.amd.js
Last active May 12, 2021 18:01
Take css transform gibberish; output sanity (to be continued)
/*
DeMatrix
Take css transform gibberish; output sanity.
*/
define([], function () {
function DeMatrix(a, b, c, d, e, f) {
return {
a,
b,
c,
@dvdrtrgn
dvdrtrgn / fixed-bkgr.css
Created April 27, 2021 21:56
Fixed body background cover on mobile
body::after {
background-image: url(./images/bkgr.png);
background-position: center;
background-size: cover;
content: '';
position: fixed;
bottom: 0;
left: 0;
right: 0;
@dvdrtrgn
dvdrtrgn / fix-homebrew-npm.md
Last active December 30, 2018 05:16 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script>
document.body.innerText = '';
@dvdrtrgn
dvdrtrgn / video-fix-videos-for-pseudo-streaming.md
Created January 10, 2018 16:42 — forked from alienresident/video-fix-videos-for-pseudo-streaming.md
How to: Fix pseudo-streaming videos by moving Moov Atom
How to:

Fix pseudo-streaming videos by moving Moov Atom

Relies on some *nix CLI utilities: mediainfo; and qt-faststart (part of ffmpeg). I used homebrew to install them on OS X.

What is pseudo-streaming?

Pseudo streaming is simply a video that can start playing before it's fully dowmloaded. The videos are not streaming but rather progressively downloaded. What's important is that the file metadata (the Moov Atom) is at the start of the file rather than at the end. Usually this is an option set when encoding the file (called quick start or web start). If the files have not been encoded this way you can either re-encode or use a utility to move the Moov Atom. Re-encoding takes much longer than using a utility to move the Moov Atom so here's how to do it.

Steps

First check with mediainfo to see if video 'is streamable':

var states_abbr = {
AL: 'Alabama',
AK: 'Alaska',
AZ: 'Arizona',
AR: 'Arkansas',
CA: 'California',
CO: 'Colorado',
CT: 'Connecticut',
DE: 'Delaware',
FL: 'Florida',