Skip to content

Instantly share code, notes, and snippets.

View johanbove's full-sized avatar
💭
Semper meliorem facio

Johan Bové johanbove

💭
Semper meliorem facio
View GitHub Profile
@rodneyrehm
rodneyrehm / feedback.md
Last active August 29, 2015 14:01
WPDS Düsseldorf 2014 - JavaScript Group // http://wpd.mx/dusjs

#Talks

##Jeremy Keith

  • The idea of the internet is to make everyone a publisher
  • In contrast to Apps there is no gatekeeper
  • Grunt an SASS and so on are great but raise the entry bar for content creation
  • Geocities: Founded 1994. 3rd most visited on the web. Never the prettiest, but also a playground for everyone, for normal people.
  • 1999 Yahoo acquired Geocities, in 2009 it was shut down and 15 years of content were just wiped out
  • The content might be mostly ugly, but it is also a fragment of history
@rodneyrehm
rodneyrehm / log-requests.php
Last active August 29, 2015 14:11
IE11 Bug: Favicon Request
<?php
$logfile = '/tmp/ie-11-favicon.log';
if (empty($_GET['type'])) {
$_GET['type'] = 'html';
}
$headers = array(
'Request ' . $_GET['type'] . ' at ' . date('Y-m-d H:i:s'),
@paulirish
paulirish / gist:1445367
Created December 7, 2011 23:55
barackobama.com's css
@charset "utf-8";
html, body, body div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video
{ margin: 0; padding: 0; border: 0; font-size: 100%; vertical-align: baseline; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section
{ display: block }
blockquote, q { quotes: none }
@milligramme
milligramme / pushover.rb
Created July 23, 2012 18:25
pushover ruby sample
require "net/https"
url = URI.parse("https://api.pushover.net/1/messages")
req = Net::HTTP::Post.new(url.path)
req.set_form_data({
:token => "abc123",
:user => "user123",
:message => "hello world",
})
res = Net::HTTP.new(url.host, url.port)
@lelandrichardson
lelandrichardson / ko-convenience.js
Created March 5, 2014 01:11
Knockout.js Custom Utility Bindings
(function (ko, handlers, unwrap, extend) {
"use strict";
extend(handlers, {
href: {
update: function (element, valueAccessor) {
handlers.attr.update(element, function () {
return { href: valueAccessor() };
});
}
},
@pangratz
pangratz / application.controller.js
Last active October 5, 2016 10:55
ds-references
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
loadFamily: function() {
var personRef = this.store.getReference('person', 1);
var person = personRef.value();
var familyRef = person.belongsTo('family');
if (!familyRef.value()) {
@alkos333
alkos333 / gist:1771618
Created February 8, 2012 17:52
Read URL GET variable
// Given a query string "?to=email&why=because&first=John&Last=smith"
// getUrlVar("to") will return "email"
// getUrlVar("last") will return "smith"
// Slightly more concise and improved version based on http://www.jquery4u.com/snippets/url-parameters-jquery/
function getUrlVar(key){
var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search);
return result && unescape(result[1]) || "";
}
@balupton
balupton / README.md
Last active April 20, 2022 13:21
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
@siakaramalegos
siakaramalegos / webmentions.njk
Created November 22, 2019 21:06
Version of my webmentions nunjucks file used when writing my post about Webmentions and Eleventy
<div class="webmentions content-grid-sibling" id="webmentions">
{% set mentions = webmentions | getWebmentionsForUrl(metadata.url + webmentionUrl) %}
{% set reposts = mentions | webmentionsByType('repost-of') %}
{% set repostsSize = reposts | size %}
{% set likes = mentions | webmentionsByType('like-of') %}
{% set likesSize = likes | size %}
{% set replies = mentions | webmentionsByType('in-reply-to') %}
{% set repliesSize = replies | size %}