This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"path/filepath" | |
"fmt" | |
"os" | |
"strings" | |
"time" | |
"sort" | |
"net/http" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def debug(a): | |
print "%s = %s" % locals().popitem() | |
a = 1 | |
debug(a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
def debug(a): | |
print "%s = %s" % locals().popitem() | |
a = 1 | |
debug(a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo $(get_db_tags) | while read id tag | |
do | |
start_db $tag | |
get_db_version $id $tag | |
cleanup | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo $(get_db_tags) | while read id tag | |
do | |
start_db $tag | |
get_db_version $id $tag | |
cleanup | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for x in range(1,8): | |
print "*" * x + "o" * (15 - x*2) + "*" * x | |
for x in range(7,0,-1): | |
print "*" * x + "o" * (15 - x*2) + "*" * x | |
*ooooooooooooo* | |
**ooooooooooo** | |
***ooooooooo*** |
OlderNewer