Skip to content

Instantly share code, notes, and snippets.

View Vintharas's full-sized avatar
👶
Parenting

Jaime Vintharas

👶
Parenting
View GitHub Profile
@dreampiggy
dreampiggy / mov2webp.sh
Created March 6, 2017 05:31
ffmpeg MOV to Animated WebP
ffmpeg -i input.mov -vcodec libwebp -lossless 1 -q:60 -preset default -loop 0 -an -vsync 0 output.webp
@StephenFluin
StephenFluin / main.ts
Created June 14, 2016 23:37
Try out the latest changes to forms in Angular 2.0.0-rc2
import {disableDeprecatedForms, provideForms} from '@angular/forms';
...
bootstrap(App, [
disableDeprecatedForms(),
provideForms(),
...
]);
@addyosmani
addyosmani / draft.md
Last active November 3, 2017 11:32
Babelon - smarter transpilation targeting for Babel

Inspiration: https://twitter.com/samccone/status/722826060161617923

Modern JavaScript engines support an increasing intersection of ES2015 (and above) features which simply don't require transpilation in order to be successfully parsed and executed. This project lays out a proposal for a lightweight Autoprefixer-style tool that takes as input a target set of browsers (A) which check against a source of data for supported ES features (Kangax ES6 tables (B) (see https://github.com/kangax/compat-table/blob/gh-pages/data-es6.js) and generate a mapping to Babel transforms for features requiring transpilation that are not supported (C) or not fully supported (e.g behind flags or staged but not flipped on to default).

To avoid the introduction of even more configuration files, this tool could piggyback off of some config we could

@btroncone
btroncone / ngrxintro.md
Last active February 9, 2024 15:37
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@ericelliott
ericelliott / essential-javascript-links.md
Last active April 22, 2024 10:15
Essential JavaScript Links
@osbornm
osbornm / bindings.js
Created December 1, 2014 19:40
KnockoutJs href binding
ko.bindingHandlers.href = {
init: function (element, valueAccessor, allBindings, viewModel, bindingContext) {
return ko.bindingHandlers['attr']['update'](element, function () {
return { href: valueAccessor() };
}, allBindings, viewModel, bindingContext);
}
}
@mzabriskie
mzabriskie / random-attendee.js
Last active March 6, 2021 16:13
Select random Meetup attendee
// Run this from your browser console on your meetup event page (http://www.meetup.com/AngularJS-Utah/events/183104032/)
(function () {
// Query document for attendees and select a random one
const list = document.querySelector('ul.attendees-list').children,
item = list[Math.floor(Math.random() * list.length)],
name = item ? item.querySelector('h4.text--bold').innerText : 'N/A';
// Remove item so they can only be selected once
item && item.parentNode.removeChild(item);
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

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.