Metadata in PDF files can be stored in at least two places:
- the Info Dictionary, a limited set of key/value pairs
- XMP packets, which contain RDF statements expressed as XML
### | |
### Fast cloning with overlayfs, and specifying user-data on clone | |
### blog post: | |
### http://ubuntu-smoser.blogspot.com/2013/08/lxc-with-fast-cloning-via-overlayfs-and.html | |
### | |
### Eventually, this should make it into 13.10 and the stable lxc ppa | |
### https://launchpad.net/~ubuntu-lxc/+archive/stable | |
### But right now you'll have to use the daily ppa. |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
#!/usr/bin/perl | |
use Mysql; | |
use strict; | |
use vars qw($school_name); | |
use vars qw($pass); | |
require "./cgi-lib.pl"; |
## | |
# by SoAwesomeMan | |
str =<<-EOS.gsub(/^[\s\t]*|[\s\t]*\n/, '') # no space "\s" for new line "\n"; kill tabs too | |
select awesome, awesome, awesome, awesome, awesome, awesome, | |
from rad, rad, rad, rad, rad, rad, rad, rad, rad, rad, rad, | |
where cool cool cool cool cool cool cool cool cool cool cool' | |
EOS | |
# => "select awesome, awesome, awesome, awesome, awesome, awesome,from rad, rad, rad, rad, rad, rad, rad, rad, rad, rad, rad,where cool cool cool cool cool cool cool cool cool cool cool'" | |
str =<<-EOS.gsub(/^[\s\t]*/, '').gsub(/[\s\t]*\n/, ' ').strip # yes space "\s" for new line "\n"; kill tabs too |
RDBMS-based job queues have been criticized recently for being unable to handle heavy loads. And they deserve it, to some extent, because the queries used to safely lock a job have been pretty hairy. SELECT FOR UPDATE followed by an UPDATE works fine at first, but then you add more workers, and each is trying to SELECT FOR UPDATE the same row (and maybe throwing NOWAIT in there, then catching the errors and retrying), and things slow down.
On top of that, they have to actually update the row to mark it as locked, so the rest of your workers are sitting there waiting while one of them propagates its lock to disk (and the disks of however many servers you're replicating to). QueueClassic got some mileage out of the novel idea of randomly picking a row near the front of the queue to lock, but I can't still seem to get more than an an extra few hundred jobs per second out of it under heavy load.
So, many developers have started going straight t
There are a lot of complaints going around about Laravel these days, but a lot | |
of the important ones seem to be missing from the spotlight. | |
Bugfixes, issues and pull requests being left open for months with no | |
clarification of intent: | |
- https://github.com/laravel/framework/pull/1799 | |
- https://github.com/laravel/framework/issues/1963 | |
- https://github.com/laravel/framework/issues/2089 | |
- https://github.com/laravel/framework/issues/2234 |
#!/bin/sh | |
set -e | |
if [ "${VIRTUAL_ENV}" = "" ]; then | |
echo "Error: Not in a virtual env" | |
exit 1 | |
fi | |
OS=$(uname -s) |
[sendemail]
smtpserver = smtp.gmail.com
smtpserverport = 587
smtpencryption = tls
smtpuser = <gmail email address>
from = <email address for From: field>
''' | |
rate_limit.py | |
Written May 7-8, 2014 by Josiah Carlson | |
Released under the MIT license. | |
Offers a simple interface for offering rate limiting on a per second, minute, | |
hour, and day basis. Useful for offering varying rate limits depending on user | |
behavior. Sliding window based limits offer per minute, hour, and day limits |