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
>>> a = 'foo' | |
>>> b = ''.join(['f', 'o', 'o']) | |
>>> a | |
'foo' | |
>>> b | |
'foo' | |
>>> type(a) | |
<type 'str'> | |
>>> type(b) | |
<type 'str'> |
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 a(foo=[]): | |
... foo.append('bar') | |
... print foo | |
... | |
>>> a() | |
['bar'] | |
>>> a() | |
['bar', 'bar'] |
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 coffee | |
exec = require('child_process').exec | |
krneki = 'krneki: ' | |
getConfig = (cmd) -> | |
child = exec(cmd, (error, stdout, stderr) -> | |
if stderr or error | |
console.log 'stderr: ' + stderr | |
console.log 'error: ' + error |
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 coffee | |
exec = require('child_process').exec | |
getConfig = (cmd) -> | |
child = exec(cmd, (error, stdout, stderr) -> | |
if stderr or error | |
console.log 'stderr: ' + stderr | |
console.log 'error: ' + error | |
result = stdout.toString() |
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 | |
set -eu -o pipefail | |
APP_ROOT="$(dirname $(readlink -e $0))/.." | |
echo "Deleting .npm cache dirs" | |
find $APP_ROOT -depth -type d -name ".npm" -exec rm -rf {} \; | |
echo "Deleting every node_modules folder" |
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
root@dev# docker images | grep lala | |
test:4000/lala latest ce3e63034b09 2 minutes ago 474.2 MB | |
test4000/lala latest ce3e63034b09 2 minutes ago 474.2 MB | |
root@dev# curl http://172.17.42.1:2375/images/json?filter="test:4000/lala" | |
[] | |
root@dev# curl http://172.17.42.1:2375/images/json?filter="test4000/lala" | |
[{"Id":"ce3e63034b0940729c6e208c87ce5028c2b6fe6abb0e2a5d0715207be35c4651","ParentId":"973bec2aaff33d0ab02ee5701d9a69a36f16fe4eaf1841a62dae30a8d6074a09","RepoTags":["test4000/lala:latest"],"RepoDigests":[],"Created":1448700606,"Size":24410985,"VirtualSize":474190804,"Labels":{}}] |
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
root@dev# docker images | grep lala | |
test:4000/lala latest ce3e63034b09 40 seconds ago 474.2 MB | |
root@dev# curl http://172.17.42.1:2375/images/json?filter="test:4000/lala" | |
[] |
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
root@dev:~# docker images | |
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE | |
localhost:5000/db prod 77184a041db2 7 months ago 474.2 MB | |
progrium/consul latest ac951b29fd7a 7 months ago 60.74 MB |
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
root@dev:~# curl http://172.17.42.1:2375/images/json?filter="progrium/consul" | |
[{"Id":"ac951b29fd7a3f3c2989cf61f2e9ce8abebef0637a598b56af3309ca167bcf4c","ParentId":"066f69ebf7a46fa3bdcf744e6261898210c9f1795e1c96b563020bf1bf4911db","RepoTags":["progrium/consul:latest"],"RepoDigests":[],"Created":1428530515,"Size":0,"VirtualSize":60744594,"Labels":null}] | |
root@dev:~# curl http://172.17.42.1:2375/images/json?filter="localhost:5000/db" | |
[] |
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*** |
NewerOlder