| class DeliverHook(Task): | |
| def run(self, target, payload, instance_id=None, hook_id=None, auth_token=None, **kwargs): | |
| """ | |
| target: the url to receive the payload. | |
| payload: a python primitive data structure | |
| instance_id: a possibly None "trigger" instance ID | |
| hook_id: the ID of defining Hook object | |
| """ | |
| headers = { | |
| 'Content-Type': 'application/json' |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
On Tue Oct 27, 2015, history.state.gov began buckling under load, intermittently issuing 500 errors. Nginx's error log was sprinkled with the following errors:
2015/10/27 21:48:36 [crit] 2475#0: accept4() failed (24: Too many open files)
2015/10/27 21:48:36 [alert] 2475#0: *7163915 socket() failed (24: Too many open files) while connecting to upstream...
An article at http://www.cyberciti.biz/faq/linux-unix-nginx-too-many-open-files/ provided directions that mostly worked. Below are the steps we followed. The steps that diverged from the article's directions are marked with an *.
- * Instead of using
suto runulimiton the nginx account, useps aux | grep nginxto locate nginx's process IDs. Then query each process's file handle limits usingcat /proc/pid/limits(wherepidis the process id retrieved fromps). (Note:sudomay be necessary on your system for thecatcommand here, depending on your system.) - Added
fs.file-max = 70000to /etc/sysctl.conf
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
| select * | |
| from item_occurrence | |
| where timestamp >= unix_timestamp() - 24 * 60 * 60 | |
| and request.url like '%mydomain.com%' |
I don't own this. But the original source is no longer online (insofar as I can tell) and the Wayback machine is currently the only source.
Given that, I wanted to post this here where it could exist in perpetuity, for my use and everybody else's, as well as being fork-able and helpful.
Credit where its due, I was originally introduced to the list via this post on server naming schemes. Also, apparently I'm not the first guy to have this idea.
| --- | |
| - name: Add Percona apt signing key | |
| sudo: yes | |
| apt_key: keyserver=keys.gnupg.net id=1C4CBDCDCD2EFD2A state=present | |
| - name: Add Percona repository | |
| sudo: yes | |
| apt_repository: repo='deb http://repo.percona.com/apt trusty main' state=present | |
| - name: Add Percona source repository |
#How I built an audio book reader for my nearly blind grandfather
Last year, when visiting my family back home in Holland, I also stopped by my grand-parents. My grand-father, now 93 years old, had always been a very active man. However, during the presceding couple of months, he'd gone almost completely blind and now spent his days sitting in a chair. Trying to think of something for him to do, I suggested he try out audio books. After finally convincing him -- he said audio books were for sad old people -- that listening to a well performed recording is actually a wonderful experience, I realized the problem of this idea.
####The problem with audio devices and the newly blind. After my first impulse to jump up and go buy him an
