Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Evans bencevans

View GitHub Profile
@bencevans
bencevans / gist:3513313
Created Aug 29, 2012 — forked from mebcomputers/gist:2550712
php: create visitor log file
View gist:3513313
<?php
class log {
public $filename;
public $timestamp;
public $ip;
public $u_agent;
public $u_refer;
public $ub;
@bencevans
bencevans / gist:5162086
Created Mar 14, 2013
spotify-web skeleton
View gist:5162086

var Spotify = require('spotify-web');

{ [Function: Spotify]
  gid2id: [Function],
  id2uri: [Function],
  uri2id: [Function],
  gid2uri: [Function],
  uriType: [Function],
  login: [Function],
  super_: [Function: EventEmitter] }
View leaflet-google.js
/**
* L.TileLayer is used for standard xyz-numbered tile layers.
*/
L.Google = L.Class.extend({
includes: L.Mixin.Events,
options: {
minZoom: 0,
maxZoom: 18,
View keybase.md

Keybase proof

I hereby claim:

  • I am bencevans on github.
  • I am bencevans (https://keybase.io/bencevans) on keybase.
  • I have a public key ASCcacXpuZoLtEql7RBh6Qan9X3NjqBIF-WPotYbn8lFZAo

To claim this, I am signing this object:

@bencevans
bencevans / Makefile
Created Nov 5, 2018
GitHub Style Markdown -> PDF with Pandoc + Weasyprint
View Makefile
build:
pandoc writing.md --standalone \
--bibliography writing.bib --csl writing.csl \
-c https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/2.10.0/github-markdown.css \
-t html \
| sed '/<body>/c\<body class="markdown-body">' \
| weasyprint - output.pdf
@bencevans
bencevans / dabblet.css
Last active Oct 21, 2019
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
html, body {
font-family: 'Inconsolata', monospace;
max-width: 800px;
}
table {
View keybase.md

Keybase proof

I hereby claim:

  • I am bencevans on github.
  • I am bencevans (https://keybase.io/bencevans) on keybase.
  • I have a public key ASBdQHTwQoYlNESpTFvtlpIvn5A_OsGx-F2T-3l7TyeK0wo

To claim this, I am signing this object:

@bencevans
bencevans / dabblet.css
Created Feb 25, 2017
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
body {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
}
View dabblet.css
/**
* Search Bar
*/
body {
margin: 0;
}
.topbar {
height: 42px;
View dabblet.css
/**
* Search Bar
*/
body {
margin: 0;
}
.topbar {
height: 42px;