Skip to content

Instantly share code, notes, and snippets.

Build the docker image and start the container.

Start Xvfb in the container via

$ /etc/init.d/xvfb start

Run Chrome with working WebGL in kiosk mode

@moonglum
moonglum / fizzbuzz.html
Last active November 24, 2015 13:47
This is a FizzBuzz Solution I found on Twitter. It was always shared as a screenshot, so I typed it myself, to try it out ;) Source: https://twitter.com/ericwastl/status/667567483432402944
<html>
<head>
<style>
body {
counter-reset: n;
}
div:before {
counter-increment: n;
content: counter(n);
}
@essen
essen / http_specs.md
Last active January 10, 2022 02:01
HTTP and related specifications
@igrigorik
igrigorik / server-timing.md
Last active April 29, 2023 15:04
Mechanism to communicate server timing data to the client (Server Timing)

Navigation and Resource Timing provides timing data for the fetch, but currently there is no interoperable way for the server to communicate own timing information to the client. For example:

  • What steps were taken to generate the resource, and how long each took. Many sites already embed this type of information via HTML comments - e.g. wordpress emits <!--Page generated in X.X seconds.--> , and many sites provide more detailed stats (cache, db, generation) to enable performance debugging.
  • If proxied, where was the time spent - e.g. time to fetch from origin, time to process response, etc.

Instead of relying on arbitrary HTML comments, we can define an HTTP header that can be used to send key-value pairs in a well defined format. Making this data available via a well defined interface would...

  • Allow UA and other developer tools to automatically annotate appropriate timelines.
  • Allow analytics vendors to gather this data for operational analysis.
  • Allows proxies and CDNs to append custom timing d
@ztellman
ztellman / gist:66ba4e65558a064920e9
Created October 31, 2014 10:07
reading list from PolyConf 2014

Fiction

  • Fictions and The Aleph by Borges
  • Invisible Cities by Calvino

More Technical

  • An Introduction to General Systems Thinking by Weinberg
  • Data and Reality by Kent
  • Patterns of Software by Gabriel
#!/usr/bin/env bash
if [ $# -ne 2 ]
then
echo "Usage: erl_new <type> <project_name>"
exit 1
fi
TYPE=$1
PROJECT_NAME=$2
@jj1bdx
jj1bdx / p3.erl
Last active March 11, 2016 19:05
Prime number generator with lazy evaluation in Erlang: See http://erlang.org/pipermail/erlang-questions/1999-March/000176.html
%%% Prime number sieve code with lazy evaluation by Joe Armstrong
%%% (very slightly modified for syntax check)
%%% http://erlang.org/pipermail/erlang-questions/1999-March/000176.html
-module(p3).
-export([from/1,filter/2,sift/2,sieve/1,primes/0, first/1]).
%% This generates a lazy sequence starting from K.
%% from(K) ->
@hdiedrich
hdiedrich / install-r15b01.sh
Created June 12, 2012 13:59 — forked from rkmax/install-r15b.sh
Script to install Erlang R15B01 (tested on a fresh Ubuntu 12.04 install)
# You will need to make this file executable (chmod u+x) and run it with sudo
apt-get update
apt-get --fix-missing -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu1-mesa-dev fop xsltproc default-jdk
mkdir -p /src/erlang
cd /src/erlang
wget http://www.erlang.org/download/otp_src_R15B01.tar.gz
tar -xvzf otp_src_R15B01.tar.gz
chmod -R 777 otp_src_R15B01
cd otp_src_R15B01
./configure
@peternixey
peternixey / securing_rails_updates.md
Created March 5, 2012 13:10
How Homakov hacked GitHub and how to protect your application by Peter Nixey

##How Homakov hacked GitHub and the line of code that could have prevented it


Please note: THIS ARTICLE IS NOT WRITTEN BY THE GITHUB TEAM or in any way associated with them. It's simply hosted as a Gist because the markdown formatting is excellent and far clearer than anything I could manage on my personal Tumblr at peternixey.com.

If you'd like to follow me on twitter my handle is @peternixey


@seancribbs
seancribbs / xmlsimple.erl
Created February 27, 2012 20:18
Module to simplify XML reading/manipulation stuffs in Erlang
%% @doc Uses SAX to convert an XML document into a simple nested-tuple
%% structure. Ignores namespaces.
-module(xmlsimple).
-export([file/1,
string/1,
emit/1,
emit_file/2]).
-include_lib("xmerl/include/xmerl.hrl").