Skip to content

Instantly share code, notes, and snippets.

Peter Baumgartner ipmb

  • Lincoln Loop
Block or report user

Report or block ipmb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ipmb
ipmb / article.md
Last active Aug 29, 2015
Wired.jp New Work Style article translation
View article.md

A proposal from the creator of "a company without an office": recommending a work style that allows you to live wherever you want

The staff at Lincoln Loop, a company that doesn't have any office, are free to choose wherever they want to work, in addition to wherever they want to live. No two of them live in the same place: France, Sweden, Portugal, and New Zealand, among others. The founder has tried to prove that in spite of differences in location, the staff can still come together as a company. He says that the work style of the future will "allow you to live where you want" before any other considerations.

Text by WIRED.jp_M
Photographs courtesy of Peter Baumgartner & Editory

Peter Baumgartner

View fault_tolerant_cache.py
import logging
from functools import wraps
from django.core.cache.backends.memcached import PyLibMCCache
logger = logging.getLogger(__name__)
def fault_tolerant_wrapper(f):
@wraps(f)
def wrapper(*args, **kwargs):
@ipmb
ipmb / nginx.conf
Created Oct 22, 2014
Hack to put Google auth in front of Kibana and ES
View nginx.conf
upstream elasticsearch {
# google auth proxy -> elasticsearch
server 127.0.0.1:9201;
}
server {
root /path/to/kibana;
# insert standard Nginx boilerplate...
View s3_backup.py
#!/usr/bin/env python
import datetime
import fnmatch
from functools import partial
import gzip
import json
import os
import shutil
import socket
View sys_stats.py
#!/usr/bin/env python
import socket
import time
import psutil
PREFIX = [
'server',
socket.getfqdn().replace('.', '_'),
]
View Dockerfile
FROM centos:7
ENV VERSION versions/0.9
ENV GO_VERSION 1.4.2
ENV CMAKE_VERSION 3.2.3
ENV PATH=/go/bin:$PATH
ENV GOROOT=/go
RUN yum install -y git gcc make rpmdevtools mercurial
RUN curl -sO https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz && \
@ipmb
ipmb / _double_your_requests.md
Last active Aug 29, 2015
How to Double your Traffic with JavaScript
View _double_your_requests.md

Making an HTTP request to undefined is the equivalent of requesting the same page again ('.' or window.location.href). The examples below were found in three out of three front-end performance audits we performed for clients at Lincoln Loop over the last two weeks.

@ipmb
ipmb / text.md
Created Aug 21, 2015
PyPy vs. CPython comparison
View text.md

Test machine: OS X 10.10.5 w/ 2.4 GHz Intel Core i5

Server:

$ gunicorn -w2 botbot.wsgi:application

Client:

View djangobench.sh
#!/bin/bash
PYPYVENV="~/db-pypy"
CPYVENV="~/db-cpy"
virtualenv --python=`which pypy` $PYPYVENV
virtualenv $CPYVENV
$PYPYVENV/bin/pip install -e git://github.com/django/djangobench.git#egg=djangobench
$CPYVENV/bin/pip install -e git://github.com/django/djangobench.git#egg=djangobench
View sample_rss.xml
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>RSS Example</title>
<description>This is an example of an RSS feed</description>
<link>http://www.domain.com/link.htm</link>
<lastBuildDate>Mon, 28 Aug 2006 11:12:55 -0400 </lastBuildDate>
<pubDate>Tue, 29 Aug 2006 09:00:00 -0400</pubDate>
You can’t perform that action at this time.