Skip to content

Instantly share code, notes, and snippets.

View pcomans's full-sized avatar
🙈

Philipp Comans pcomans

🙈
  • Software Engineer at @1debit
  • Sacramento
View GitHub Profile
<link rel="import" href="../paper-slider/paper-slider.html">
<link rel="import" href="../paper-progress/paper-progress.html">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
"use strict";
var casper = require('casper').create({
verbose: true,
logLevel: "debug"
});
casper.echo('Casper started...');
casper.start('http://designit.com/team');
SITE TOTAL_VISITS CHARGE_FREE PERCENT_CHANGE
British Museum 5842138 F 4.90%
Tate Modern 5061172 F 7.00%
National Gallery 4954914 F 3.70%
Natural History Museum 4647613 F 13.20%
Science Museum (South Kensington) 2751902 F -0.50%
V&A (South Kensington) 2629065 F 16.00%
National Maritime Museum 2419802 F 2.19%
Tower of London (HRP) 2414541 C 1.04%
St Paul's Cathedral 1892467 F/C 4.00%
British Museum 5842138 F 4.90%
Tate Modern 5061172 F 7.00%
National Gallery 4954914 F 3.70%
Natural History Museum 4647613 F 13.20%
Science Museum (South Kensington) 2751902 F -0.50%
V&A (South Kensington) 2629065 F 16.00%
National Maritime Museum 2419802 F 2.19%
Tower of London (HRP) 2414541 C 1.04%
St Paul's Cathedral 1892467 F/C 4.00%
function tick(e) {
node.each(gravity(.2 * e.alpha))
.each(collide(.3))
.attr("cx", function(d) { return d.x; })
.attr("cy", function(d) { return d.y; })
.attr("transform", function(d) {
return "translate(" + d.x + "," + d.y + ")";
});
}
British Museum 5842138 F 4.90%
Tate Modern 5061172 F 7.00%
National Gallery 4954914 F 3.70%
Natural History Museum 4647613 F 13.20%
Science Museum (South Kensington) 2751902 F -0.50%
V&A (South Kensington) 2629065 F 16.00%
National Maritime Museum 2419802 F 2.19%
Tower of London (HRP) 2414541 C 1.04%
St Paul's Cathedral 1892467 F/C 4.00%
@pcomans
pcomans / InstapaperVollkorn.user.js
Created March 9, 2012 16:29
Changes Georgia to Vollkorn on Instapaper
// ==UserScript==
// @name Instapaper Fonts
// @namespace http://www.philippcomans.de/userscripts
// @description Changes fonts on Instapaper
// @match http://www.instapaper.com/read/*
// ==/UserScript==
(function() {
var head = document.getElementsByTagName('head')[0];
var wf = document.createElement('link');
(defn acc-tail-merge
"Trololo"
[acc list1 list2 func]
(cond
(empty? list1) (concat acc list2)
(empty? list2) (concat acc list1)
:else (let [[first1 & rest1] list1
[first2 & rest2] list2
[small-first small-rest large-list] (if (func first1 first2) [first1 rest1 list2] [first2 rest2 list1])
new-acc (concat acc [small-first])]
(ns lang-map
(:use [clojure.data.json :only (json-str write-json read-json)]))
(defn wiki-lookup [word]
(let [query (str "http://en.wikipedia.org/w/api.php?action=opensearch&search=" word "&namespace=0&format=json")]
(read-json (slurp query))))
(wiki-lookup "Scheme")