Edit your wsgi.py file to wrap your application
object as shown in the attached example.
Then go to /__guppy__
to see memory usage profiling.
This is very basic and probably needs to be refined.
Edit your wsgi.py file to wrap your application
object as shown in the attached example.
Then go to /__guppy__
to see memory usage profiling.
This is very basic and probably needs to be refined.
bitlbee: | |
type: python-worker | |
systempackages: | |
- bitlbee | |
processes: | |
bitlbee: bitlbee -n |
--- a/fs/namespace.c.orig 2012-09-27 18:46:48.198667043 +0000 | |
+++ b/fs/namespace.c 2012-09-27 18:47:13.214668751 +0000 | |
@@ -2797,7 +2797,8 @@ | |
struct mnt_namespace *mnt_ns = ns; | |
struct path root; | |
- if (fs->users != 1) | |
+ int fs_users = atomic_read(&(fs->users)); | |
+ if (fs_users != 1) | |
return -EINVAL; |
www: | |
# We use ruby-worker because we don't want all the scaffolding that comes with ruby (passenger etc.) | |
type: ruby-worker | |
# ... But we still want a www port to get HTTP traffic! | |
ports: | |
www: http | |
processes: | |
# OK, let's face it, I don't have the exact syntax of unicorn on the top of my head, | |
# so this is blatantly fake: | |
unicorn: unicorn --port $PORT_WWW --workers 10 --run-in-foreground |
Someone asked how to get the latlong from a specific road near a town on OpenStreetMap.
If you need to do it only once (e.g., you're about to go on a trip, and your GPS cannot find your destination city, but allows you to enter GPS coordinates), you can use Nominatim, OpenStreetMap's geocoding interface.
If you need to do it multiple times, in a programmatic manner, there are at least two ways to do that.
Note: I worked with OSM data a couple of years ago, but I don't have an OSM database on my local laptop right now, so some instructions will be a bit fuzzy. I do apologize in advance.
#!/bin/sh | |
[ -f ~/.ssh/id_rsa ] || ssh-keygen -q -f .ssh/id_rsa -N '' | |
docker run -a -i -t base sh -c "apt-get install -qq openssh-server ; mkdir -p /root/.ssh ; echo $(cat ~/.ssh/id_rsa.pub) > /root/.ssh/authorized_keys ; mkdir -p /var/run/sshd ; /usr/sbin/sshd -D" |
echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event | |
cat /sys/kernel/debug/tracing/trace_pipe > out.txt | |
(Leave it running a couple of seconds, then Ctrl+C; this is just to flush the buffer) | |
cat /sys/kernel/debug/tracing/trace_pipe > out.txt | |
(Leave it running a couple of seconds, then Ctrl+C; this is to recover the data) | |
cut -d- -f2 out.txt | awk '{print $1}' | sort | uniq -c | sort -n |
Unionize lets you connect together docker containers in arbitrarily complex scenarios.
Note: I recommend to use https://github.com/jpetazzo/pipework instead.
Now if you want Unionize, it's still here. Just check those examples.
from ubuntu:precise | |
run LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y -q postgresql-9.1 postgresql-contrib-9.1 | |
copy postgresql.run /init |
for PID in /proc/[1-9]* ; do echo $(ls $PID/fd | wc -l) $PID $(cat $PID/cmdline) ; done | sort -n |