Skip to content

Instantly share code, notes, and snippets.

View ipmb's full-sized avatar

Peter Baumgartner ipmb

View GitHub Profile
@ipmb
ipmb / article.md
Last active August 29, 2015 14:01
Wired.jp New Work Style article translation

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

#!/usr/bin/env python
import socket
import time
import psutil
PREFIX = [
'server',
socket.getfqdn().replace('.', '_'),
]
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 August 29, 2015 14:24
How to Double your Traffic with JavaScript

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 August 21, 2015 22:27
PyPy vs. CPython comparison

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

Server:

$ gunicorn -w2 botbot.wsgi:application

Client:

#!/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
<?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>
@ipmb
ipmb / pivotaltracker.py
Created November 4, 2010 18:44
Scrapes hours from Pivotal Trackers optional time tracker
import datetime
import decimal
import logging
from StringIO import StringIO
from lxml import html
import twill
from twill import commands as twl
logging.basicConfig(level=logging.WARNING)
from boto.iam import IAMConnection
iam = IAMConnection(aws_key, aws_secret)
iam.create_user('user')
iam.create_group('group')
iam.put_group_policy('group', 'EC2', '{"Statement":[{"Effect":"Allow","Action":"ec2:*","Resource":"*"}]}')
iam.add_user_to_group('group', 'user')
iam.create_access_key('user')
import os
from fabric.api import *
env.local_root=os.path.dirname(__file__)
def deploy_github():
with lcd(env.local_root):
local('git checkout master')
commit = local('git log -1|grep commit', capture=True)