A random neuron fired in my brain and I was curious as to which grew faster, Fibonacci or n2. While I was at it I also plotted 2n.
Here's how you can get Dropbox to run as a user service from systemd under Feodra. If you use a different distro that uses systemd the commands are probably the same but your mileage may vary.
For the most part I like systemd but good luck remembering all these commands in 6 months when you want to make another user service.
NameChanger is a quick and easy way to bulk rename files on OSX. But it took a bit of trial and error for me to figure out how to use back references when I wanted to use a regular expression. This brand of regex syntax uses
- select and drag some files into the left pane
- eg file:
301 - some.show.name.avi->
- left box:
^(\d)(\d\d).*, middle box: regular expression, right box:
- click the rename button
I recently needed to have a pool of objects and it would make everyones life a lot easier if those objects would automatically return themselves to the pool when they were done.
Here's my take on a shared pointer pool.
This is a quick and dirty config guide to setup
nginx. I did this on
Fedora 20 so on a different distro some paths will likely be different.
I've also ignored security in this post as I have ssl termination handled elsewhere. This will send your password in the clear if you don't have ssl setup correctly! Don't forget to setup git permissions as well. This config allows any authorized user (somebody who can login) to push.
OMG I HATE MY LIFE SOMETIMES
So… I'll hopefully write more about this later, but the TL;DR is do not use
So if you have something like this in your
wsgi.py, comment it out with extreme prejudice.
import monitor monitor.start(interval=60)
Symptoms include, but not limited to:
- workers not shutting down
- workers appear to hang and cause 50x errors
- workers not restarting if you send appropriate signals
- workers appear to work once or twice then hang
- workers never work
- randomness and non-determinism all over the f'in place
- little to no helpful log output
- propensity to start adding lots of config variables that you don't understand
- propensity to start drinking
- wondering htf everybody else seems to use this software without a problem
- wondering if perhaps computers where a poor career choice after all
I haven't looked into too closely but I suspect the fact that the monitor opens up it's own thread and runs forever has something to do with it. Open files, open sockets, stuff like that.
muttrc you should have something like the following:
set query_command = "goobook query '%s'" bind editor <tab> complete bind editor ^T complete-query
and if auto-completion of aliases isn't working make sure you don't have:
bind editor <tab> complete-query bind editor ^T complete
Note that the
Ctrl-T runs your
tab auto-completes as appropriate (likely from your alias list).
That took too long to figure out…
This pattern which I thought up (but is likely not unique) can very nicely manage your service configurations, automatically reload/restart your service, and even give non-root users (if desired) the ability to modify system config files.
All through the magic of git hooks. This example tracks config files for Apache (httpd).