This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| include /home/webmaster/www/codeable.io.conf; | |
| server_name codeable.io; | |
| listen 443 ssl spdy default_server; | |
| root /home/webmaster/www/codeable.io; | |
| index index.php index.html; | |
| error_log /var/log/nginx/codeable.io.error.log warn; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| check process hhvm with pidfile /var/run/hhvm/pid | |
| group hhvm | |
| start program = "/usr/sbin/service hhvm start" with timeout 60 seconds | |
| stop program = "/usr/sbin/service hhvm stop" | |
| if failed unixsocket /var/run/hhvm/hhvm.sock then restart | |
| if mem > 400.0 MB for 1 cycles then restart | |
| if 5 restarts with 5 cycles then timeout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install dependencies | |
| # | |
| # * checkinstall: package the .deb | |
| # * libpcre3, libpcre3-dev: required for HTTP rewrite module | |
| # * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module | |
| apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \ | |
| mkdir -p ~/sources/ && \ | |
| # Compile against OpenSSL to enable NPN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
| <title>Photos with Friends!</title> | |
| <script src="http://code.jquery.com/jquery-1.9.0.min.js"></script> | |
| <script> | |
| /** | |
| * This is the getPhoto library | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #### | |
| # Split MySQL dump SQL file into one file per table | |
| # based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump | |
| #### | |
| if [ $# -lt 1 ] ; then | |
| echo "USAGE $0 DUMP_FILE [TABLE]" | |
| exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $posts = multisite_latest_post( array( | |
| "how_many"=>10, | |
| "how_long_days"=>30, | |
| "how_many_words"=>50, | |
| "more_text"=>"[...]", | |
| "remove_html"=>true, | |
| "sort_by"=>"post_date", | |
| // if paginating: | |
| "paginate"=>true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * This is free and unencumbered software released into the public domain. | |
| * | |
| * Anyone is free to copy, modify, publish, use, compile, sell, or | |
| * distribute this software, either in source code form or as a compiled | |
| * binary, for any purpose, commercial or non-commercial, and by any | |
| * means. | |
| * |