Skip to content

Instantly share code, notes, and snippets.

@dhh
dhh / tracker_blocking.rb
Last active June 30, 2024 14:35
Current list of spy pixels named'n'shamed in HEY, as of April 23, 2020
module Entry::TrackerBlocking
extend ActiveSupport::Concern
included do
has_many :blocked_trackers
end
email_service_blockers = {
"ActiveCampaign" => /lt\.php(.*)?l\=open/,
"AWeber" => "openrate.aweber.com",

These are the questions asked when you apply for an Estonian Startup Visa program.

Intro

Welcome to Startup Committee. You will be guided through the application process.

If you already have a company profile in Startup Includer, it will take only few clicks to share the data.

@hdragomir
hdragomir / sm-annotated.html
Last active June 13, 2024 03:01
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@pixeline
pixeline / index.html
Last active May 26, 2019 03:44
Simple way to implement a stylesheet switcher, using jquery and proper html. Add your stylesheets to your <head> tag: <link rel="alternate stylesheet" title="red" href="css/red.css" type="text/css"> Include the jquery stylesheet switcher. Done.
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<link rel="stylesheet" title="main" href="normalize.min.css" type="text/css">
<link rel="stylesheet" title="main" href="main.css" type="text/css">
<link rel="alternate stylesheet" title="red" href="red.css" type="text/css">
<link rel="alternate stylesheet" title="blue" href="blue.css" type="text/css">
IMPORTANT
Please duplicate this radar for a Safari fix!
This will clean up a 50-line workaround.
rdar://22376037 (https://openradar.appspot.com/radar?id=4965070979203072)
//////////////////////////////////////////////////////////////////////////////
(Now available as a standalone repo.)
@marcaube
marcaube / bootstrap-hugrid.js
Created March 26, 2012 14:01
Twitter Bootstrap Heads-Up Grid
definegrid = function() {
var browserWidth = $(window).width();
// LARGE DESKTOP & UP
if (browserWidth >= 1200)
{
pageUnits = 'px';
colUnits = 'px';
pagewidth = 1170;
columns = 12;