Skip to content

Instantly share code, notes, and snippets.

@paulirish
paulirish / bling.js
Last active February 20, 2024 14:11
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@yocontra
yocontra / aoe2hd.md
Last active June 9, 2023 18:28
Age of Empires II HD - For Mac OSX
@TobiObeck
TobiObeck / 01_Common TypeScript errors and what they mean.md
Last active October 18, 2021 11:29
Common TypeScript errors and what they mean

Array Element implicit any, type has no index signature

Element implicitly has an 'any' type because type 'MyFancyType' has no index signature.",

class MyPerson {
  public name: string;
  public subscriptions: MyFancyType[];
  
  constructor(name: string, subscriptions: MyFancyType){...}
}
@ydn
ydn / node-yql.js
Last active October 14, 2019 11:32
YQL API
var YQL = require('yql');
var query = new YQL('SELECT * FROM weather.forecast WHERE (location = 94089)');
query.exec(function(err, data) {
var location = data.query.results.channel.location;
var condition = data.query.results.channel.item.condition;
console.log('The current weather in ' + location.city + ', ' + location.region + ' is ' + condition.temp + ' degrees.');
});