Skip to content

Instantly share code, notes, and snippets.

@orkaa
orkaa / abcbuzz.py
Last active September 8, 2015 22:01 — forked from uskudnik/abcbuzz.py
#!/usr/bin/env python
from collections import defaultdict
def abczzz(limit, abc={3: "fizzz", 5: "buzzz"}):
d = defaultdict(str)
table = []
for k, v in abc.items():
table += [{x:v for x in range(1, limit, k)}]
for t in table:
for k, v in t.items():
#!/bin/bash
echo $(get_db_tags) | while read id tag
do
start_db $tag
get_db_version $id $tag
cleanup
done
echo $(get_db_tags) | while read id tag
do
start_db $tag
get_db_version $id $tag
cleanup
done
#!/usr/bin/env python
def debug(a):
print "%s = %s" % locals().popitem()
a = 1
debug(a)
def debug(a):
print "%s = %s" % locals().popitem()
a = 1
debug(a)
orkaa@celtra-dev:~/docker-py[master]$ docker -H localhost:2376 info
Containers: 5
Images: 0
Strategy: spread
Filters: affinity, health, constraint, port, dependency
Nodes: 1
celtra-dev: 172.17.42.1:2375
└ Containers: 5
└ Reserved CPUs: 0 / 2
└ Reserved Memory: 0 B / 2.061 GiB
web:
build: stacker/files/databro
command: python app.py
ports:
- "4000:4000"
volumes:
- stacker/files/databro:/src
- dev/config.ini:/src/config.ini
environment:
ENVIRON: dev
package main
import (
"path/filepath"
"fmt"
"os"
"strings"
"time"
"sort"
"net/http"
BACKUPSPATH=/home/backups
for D in $(find $BACKUPSPATH -type d)
do
for F in $(ls -t1 $D | awk 'NR>5')
do
rm $D/$F
done
done