Skip to content

Instantly share code, notes, and snippets.

View hhsnopek's full-sized avatar
Working from home

Henry Snopek hhsnopek

Working from home
View GitHub Profile
@paulirish
paulirish / bling.js
Last active July 23, 2025 07:08
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
@ivomarino
ivomarino / momentum.sh
Last active April 24, 2018 18:42
momentum.sh - A simple script for allowing OSX users to use Momentum backgrounds
#!/bin/sh
#
# A simple script for allowing OSX users to use Momentum backgrounds found
# in this Chrome plugin https://chrome.google.com/webstore/detail/momentum/laookkfknpbbblfpciffpaejjkokdgca
# as Desktop backround.
#
# Quick one-liner installation and execution (requires wget on CLI):
#
# % wget -O ~/Pictures/momentum.sh https://gist.githubusercontent.com/ivomarino/b2ff5b26018d4f174629/raw/a91ee46e62968527f7908db2dea5b29d5708719e/momentum.sh && chmod +x ~/Pictures/momentum.sh && cd ~/Pictures && ./momentum.sh
@lavalamp
lavalamp / The Three Go Landmines.markdown
Last active February 28, 2025 12:54
Golang landmines

There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.

All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.

  1. Loop variables are scoped outside the loop.

What do these lines do? Make predictions and then scroll down.

func print(pi *int) { fmt.Println(*pi) }
@honkskillet
honkskillet / byte-sizetuts.md
Last active August 22, 2024 14:19
A series of golang tutorials with youtube videos.
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
  • 💄 when improving the format/structure of the code
  • 🚀 when improving performance
  • ✏️ when writing docs
  • 💡 new idea
  • 🚧 work in progress
  • ➕ when adding feature
  • ➖ when removing feature
  • 🔈 when adding logging
  • 🔇 when reducing logging
  • 🐛 when fixing a bug
@nicola
nicola / imessage-links.md
Last active April 10, 2022 11:26
Find all the links sent through iMessage (to a person)
  • 🎨 when improving the format/structure of the code
  • 🚀 when improving performance
  • ✏️ when writing docs
  • 💡 new idea
  • 🚧 work in progress
  • ➕ when adding feature
  • ➖ when removing feature
  • 🔈 when adding logging
  • 🔇 when reducing logging
  • 🐛 when fixing a bug
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['backbone.marionette', 'backbone.radio', 'underscore'], factory);
} else if (typeof exports !== 'undefined') {
module.exports = factory(require('backbone.marionette'), require('backbone.radio'), require('underscore'));
} else {
factory(root.Backbone.Marionette, root.Backbone.Radio, root._);
}
}(this, function(Marionette, Radio, _) {
'use strict';
@staltz
staltz / introrx.md
Last active August 27, 2025 14:59
The introduction to Reactive Programming you've been missing