A dashing widget that displays tickets for Freshdesk.com
- Displays unassigned tickets subject and time.
- Displays Ticket counts assigned to Agents.
- Time for each ticket changes color depending on age.
A dashing widget that displays tickets for Freshdesk.com
#!/usr/bin/python | |
''' Python command line argument example using argparse module | |
Example output: | |
./parser.py --server=pyserver --port=8080,443,25,22,21 --keyword=pyisgood | |
Server name: [ pyserver ] |
This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.
This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.
If you experience any difficulties or have any feedback, leave a comment. 🐬
Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.
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 *.
su
to run ulimit
on the nginx account, use ps aux | grep nginx
to locate nginx's process IDs. Then query each process's file handle limits using cat /proc/pid/limits
(where pid
is the process id retrieved from ps
). (Note: sudo
may be necessary on your system for the cat
command here, depending on your system.)fs.file-max = 70000
to /etc/sysctl.conf# To enable ANSI sequences in a PowerShell console run the following commands. | |
# After that you can use wttr.in in you PowerShell just lake that: | |
# (curl http://wttr.in/ -UserAgent "curl" ).Content | |
# | |
# More on it: | |
# http://stknohg.hatenablog.jp/entry/2016/02/22/195644 (jp) | |
# | |
Add-Type -MemberDefinition @" | |
[DllImport("kernel32.dll", SetLastError=true)] |