Skip to content

Instantly share code, notes, and snippets.

@impishj
impishj / client.js
Last active November 30, 2017 17:03 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = window.location.hash;
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
@impishj
impishj / gist:a5b938f137ffe079712e
Created June 24, 2014 15:59
mobile styles for the default mediaelement.js skin
.mejs-controls div.mejs-time-rail {
padding-top: 2px;
}
.mejs-controls .mejs-time-rail span {
height: 26px;
}
.mejs-container .mejs-controls{
height: 40px;
background-color: #f3f3f3;
padding-left: 10px;
---
layout: episode
date: 2013-01-09 21:25:18
title: Episode 14 - Fishy Fingers
duration: 18:24
length: 17068092
link: http://pubpodcast.s3.amazonaws.com/pub014.mp3
---
Darren Scott and Adam Wilcox return for a new season of podcasts. In this episode they discuss dating, breakups, Jimmy Savile, and mistaken identity.
---
layout: nil
---
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<channel>
@impishj
impishj / gist:6057353
Last active December 20, 2015 02:38
Mobile style for Hacker News.
@media only screen and (max-width:650px) { table { width:100% }
.pagetop a:first-child { display:block;width:100%;padding:0px;margin:0px;clear:both;border:none; }
.pagetop a { padding:0px 0px 12px 0px; }
.title a { padding:8px 14px 8px 10px;margin:0px 0px 0px 0px;color:#000000;background-color:#ff6600;vertical-align:middle;line-height:200%; }
span.comhead { display:inline-block;padding-top:6px; }
.subtext a, .subtext a:hover, .subtext a:visited { margin-top:3px;padding:4px 11px 4px 11px;display:inline-block; }
.subtext a:last-child { border:solid 1px #ff6600; }
table tr td:nth-child(2) { padding: 2px 10px 2px 0px; margin-right:10px; }
table tr td.subtext { background-color:#f6f6ef;} }
textarea { width:100% }