Skip to content

Instantly share code, notes, and snippets.

View brunsgaard's full-sized avatar

Jonas Brunsgaard brunsgaard

View GitHub Profile
{"gold watch",
"dog",
"cutlery",
"necklace",
"vintage Nike Sneakers",
"bottle of wine anno 1889",
"smoking gun",
"toxido",
"wig",
"stuffed baby seal",
@brunsgaard
brunsgaard / testmirrors.sh
Last active August 29, 2015 14:00
datanet test debian mirrors
#!/bin/bash
hosts=(
ftp.dk.debian.org
ftp.cn.debian.org
)
for host in ${hosts[@]}; do
IP=`nslookup $host | sed 's/Address: //' | tail -n 2 | head -n 1`
echo ==== TESTING $IP \($host\) ====
echo Ping: `ping -c 64 $IP | grep rtt`
py.test --cov-report term-missing --cov httppost tests
================================= test session starts ==================================
platform darwin -- Python 2.7.6 -- py-1.4.23 -- pytest-2.6.0
plugins: cov
collected 12 items
tests/test_utils.py ............
------------------- coverage: platform darwin, python 2.7.6-final-0 --------------------
Name Stmts Miss Cover Missing
-----------------------------------------------------------
@brunsgaard
brunsgaard / keybase.md
Last active August 29, 2015 14:06
keybase.md

Keybase proof

I hereby claim:

  • I am brunsgaard on github.
  • I am brunsgaard (https://keybase.io/brunsgaard) on keybase.
  • I have a public key whose fingerprint is 233E 6E07 ABBF 691B 1FCD 6E91 726E 9CA9 BB93 EF6B

To claim this, I am signing this object:

(ocmg)brunsgaard@archbook ~/o/httppost> py.test --cov-report term-missing --cov ocmg_httppost tests
=========================================== test session starts ===========================================
platform darwin -- Python 2.7.6 -- py-1.4.25 -- pytest-2.6.3
plugins: cov, flask
collected 37 items
tests/test_app.py ...
tests/test_schema.py .................
tests/test_utils.py .............
tests/api/test_factory.py ...
@brunsgaard
brunsgaard / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../cool-clock/cool-clock.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
<template>
from __future__ import division
from itertools import product, combinations
from random import Random, shuffle, uniform, random
import math
d = lambda (x1,y1), (x2,y2): math.sqrt((x2-x1)** 2 + (y2-y1) ** 2)
graynode = r'\filldraw[fill={}, draw=black] ({},{}) circle [radius=1.50mm];'
#grid = [(uniform(0, 10), uniform(0, 5)) for _ in range(100)]
cpoint = [(3,2.5, 'v'), (7,2.5, 'u')]
#!/bin/bash
FILES="
./app/code/local/Clerk/SearchAndRecommendations
./app/design/frontend/base/default/template/clerk
./app/design/frontend/base/default/layout/clerk.xml
./app/etc/modules/Clerk_SearchAndRecommendations.xml
./app/locale/da_DK/Clerk_SearchAndRecommendations.csv
./app/locale/en_US/Clerk_SearchAndRecommendations.csv
./skin/frontend/base/default/clerk/styles.css
Less than 80 chars
___________
< text here >
-----------
two lines
________________________________
/ text goes here text goes here \
<?php
require_once 'abstract.php';
class Mage_Shell_Clerk extends Mage_Shell_Abstract {
public function run() {
set_time_limit(0);
$clerk_feed = Mage::getModel('clerk/feed');
$clerk_feed->buildFeeds();