Skip to content

Instantly share code, notes, and snippets.

View benlumley's full-sized avatar

Ben Lumley benlumley

View GitHub Profile
# Running with --d_startup:
$ /usr/bin/perl /usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/squeezeboxserver/ --cachedir /var/lib/squeezeboxserver/cache --charset=utf8 --norestart --d_startup
Found SELinux - setting security context to: texrel_shlib_t for *.so files.
Got @INC containing:
/usr/share/squeezeboxserver/CPAN
/usr/share/squeezeboxserver
/usr/sbin
/etc/perl
Found SELinux - setting security context to: texrel_shlib_t for *.so files.
Got @INC containing:
/usr/share/squeezeboxserver/CPAN
/usr/share/squeezeboxserver
/usr/sbin
/etc/perl
/usr/local/lib/perl/5.18.2
/usr/local/share/perl/5.18.2
/usr/lib/perl5
/usr/share/perl5
@benlumley
benlumley / access.log
Created May 28, 2016 07:22
HEAD-BEFORE-GET
72.66.115.10 www.caerleon-arts.org - [28/May/2016:07:17:30 +0000] "HEAD /?apples=2 HTTP/1.1" 200 0 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; PTST 2.295)"
89.238.163.36 www.caerleon-arts.org - [28/May/2016:07:17:42 +0000] "GET /?apples=2 HTTP/1.1" 200 7911 "-" "Mozilla/5.0 (Windows NT 6.1; rv:46.0) Gecko/20100101 Firefox/46.0 PTST/278"
@benlumley
benlumley / headers.har
Created September 16, 2016 12:08
Headers
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 16 Sep 2016 12:06:30 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
X-Frame-Options: SAMEORIGIN
[{"name":"location","color":"Red","position":{"x":128,"y":105},"increment":true,"timestamp":true,"softdelete":false,"column":[],"relation":[],"seeding":[]},{"name":"test_zone","color":"Red","position":{"x":120,"y":265},"increment":true,"timestamp":true,"softdelete":false,"column":[],"relation":[],"seeding":[]}]
@benlumley
benlumley / awesomecodestillinuat.js
Created March 20, 2019 09:52
Add banners into content
jQuery(function ($) {
var $banners = $('aside .ba');
if ($banners.length) {
// find all the headings in post body - we want to put the banners in after headers
var $headings = $('#post_full .span9 > *').filter(':header');
// work out how often to put one in
var inc = Math.floor($headings.length / $banners.length);
var current = inc+1;
<script>
var timeOnPage = ({{DLV – gtm.timerEventNumber}} * {{DLV – gtm.timerInterval}}) / 1000;
fbq('trackCustom','Blog Tracking',{'Time on page': timeOnPage + 'seconds','page':'{{Page URL}}'});
</script>