Skip to content

Instantly share code, notes, and snippets.

View stefangrund's full-sized avatar

Stefan Grund stefangrund

View GitHub Profile

Keybase proof

I hereby claim:

  • I am stefangrund on github.
  • I am eay (https://keybase.io/eay) on keybase.
  • I have a public key whose fingerprint is FF58 9293 268A 801D 5528 89FA 07F1 3A3F C8EA A54F

To claim this, I am signing this object:

@stefangrund
stefangrund / Asana-without-upselling.md
Last active July 15, 2020 13:45
Hide Asana's up-selling ads in Firefox

before/after

Here's how to hide Asana's annoying UPGRADE up-sell ads:

  1. Open about:profiles in Firefox to see the path to your profile folder.
  2. Open your profile folder and add a new folder called chrome.
  3. Add the following userContent.css to the new folder.
  4. Restart Firefox.
@stefangrund
stefangrund / shortfilms_newsletter.html
Last active August 29, 2015 14:17
Mailchimp-Template for the http://shortfil.ms Newsletter
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>*|MC:SUBJECT|*</title>
<style type="text/css">
/* ========== CLIENT-SPECIFIC STYLES ========== */
#outlook a{padding:0;} /* Force Outlook to provide a "view in browser" message */
.ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;} /* Force Hotmail to display normal line spacing */
@stefangrund
stefangrund / Readme.md
Last active August 29, 2015 14:07
Gaug.es CSV Report: Create an ongoing CSV file with people/views from your Gaug.es Analytics. Works perfectly with Panic's Status Board

Gauges CSV Report

Create an ongoing CSV file with people/views from your Gaug.es Analytics. Works perfectly with Panic's Status Board.

Installation

  1. Copy gauges-csv.py to your web server or Dropbox.
  2. Fill out the script's settings with your website's name, your Gaug.es API key, etc.
  3. Run the script daily (with a cron job, Lingon or whatever) - and you're done.
@stefangrund
stefangrund / opengraph.php
Created August 20, 2014 08:18
This is the OpenGraph and Twitter Card implementation for my WordPress blog (http://eay.cc/) to display nice previews and pictures in Facebook and Twitter.
<?php
//Get first image in post
function firstImage() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$content = do_shortcode( $post->post_content );
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $content, $matches);
$first_img = $matches [1] [0];