Skip to content

Instantly share code, notes, and snippets.

View baldur's full-sized avatar

Baldur Gudbjornsson baldur

View GitHub Profile
h2 {
text-align: center;
font-size: 200%;
}
.box {
border: solid 2px black;
width: 50px;
height: 50px;
margin: 20px;
brew install libsoup gstreamer gst-plugins-base
brew install gst-plugins-good --with-libpng --with-libvpx --with-cairo --with-aalib
brew install gst-plugins-bad --with-faac --with-faad2 --with-opencv --with-opus --with-srtp
brew install gst-plugins-ugly --with-aalib --with-lame --with-libvorbis --with-pango --with-theora --with-x264
brew install gst-rtsp-server
brew install gst-libav

Keybase proof

I hereby claim:

  • I am baldur on github.
  • I am bakdyr (https://keybase.io/bakdyr) on keybase.
  • I have a public key ASAwbzNovvjpNx5BuqhY7NGfX2bIKAMpIhA5_y-ppItOrgo

To claim this, I am signing this object:

Setup tunnel
ssh -fN -R 2222:localhost:22 serveraddress
Connect
ssh -L 2222:localhost:22 serveraddress
Create a session that can be shared
#!/bin/sh
# From Gerrit Code Review 2.9.4
#
# Part of Gerrit Code Review (http://code.google.com/p/gerrit/)
#
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/docker-compose.yml b/docker-compose.yml
index 29918f0..28ae36a 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -13,7 +13,7 @@ api:
web-proxy:
build: ./web-proxy
ports:
- - "80:80"
+ - "81:81"
@baldur
baldur / gist:436b63cd1edf4ae446d6
Created April 15, 2015 18:07
Tiles size calculations
breakdown of requests by zoom
vector=# select zoom, count(zoom), min(size), max(size), round(avg(size)) as mean
from traffic group by zoom having zoom > 0 order by zoom;
zoom | count | min | max | mean
------+--------+-----+---------+-------
1 | 10801 | 29 | 10218 | 956
2 | 19237 | 29 | 7862 | 1155
3 | 25753 | 8 | 182731 | 3484
39 /osm/water,roads/13/1311/2861.topojson
39 /osm/water,roads/13/1312/2861.topojson
40 /osm/water,roads/11/511/832.topojson
40 /osm/water,roads/12/1140/1589.topojson
40 /osm/water,roads/12/657/1430.topojson
41 /osm/water,roads/12/1023/1660.topojson
41 /osm/water,roads/12/1108/1715.topojson
42 /osm/water,roads/13/1311/2860.topojson
42 /osm/water,roads/13/1312/2860.topojson
43 /osm/water,roads/10/165/355.topojson
@baldur
baldur / gist:e5432c2650e10c42f7d9
Created April 2, 2015 02:39
quick data gathering from logs
if [ "$1" != "" ]; then
format=$1
else
format=mapbox
fi
echo "count for zoom"
cat *.log | grep -e "304\|200$" | grep "\.$format" | grep -v "_healthcheck" | awk -F"/" ' { print $(NF - 2) }' | sort | uniq -c | sort -n
echo "top paths"
{
"date": 1414098128198,
"features": [
{
"geometry": {
"coordinates": [
-73.9657743,
40.80501580000001
],
"type": "Point"