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
| # command to generate dhparams.pen | |
| # openssl dhparam -out /etc/nginx/conf.d/dhparams.pem 2048 | |
| limit_conn_zone $binary_remote_addr zone=conn_limit_per_ip:10m; | |
| limit_req_zone $binary_remote_addr zone=req_limit_per_ip:10m rate=5r/s; | |
| limit_req_status 444; | |
| limit_conn_status 503; | |
| proxy_cache_path /var/lib/nginx/proxy levels=1:2 keys_zone=backcache:8m max_size=50m; | |
| proxy_cache_key "$scheme$request_method$host$request_uri$is_args$args"; |
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
| class stdin_stream: boost::noncopyable { | |
| typedef boost::function<void (const boost::system::error_code &, size_t bytes_transferred)> read_handler_type; | |
| public: | |
| stdin_stream(boost::asio::io_service &io, HANDLE hin): io(io), hin(hin), hev(CreateEvent(0, 0, 0, 0)), handler(), buffer(0), size(0) { | |
| _beginthread(&stdin_stream::thread_handler_gateway, 0, this); | |
| } | |
| ~stdin_stream() { | |
| buffer = 0; | |
| CloseHandle(hev); | |
| } |
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 | |
| AppEventDispatcher::listen(function(CakeEvent $event) { | |
| $myModel = ClassRegistry::init('MyUserPlugin.User'); | |
| return $myModel->onArticleBeforeSaveCallback($event); | |
| }, 'Model.Article.beforeSave'); | |
| ?> |
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/sh | |
| ### BEGIN INIT INFO | |
| # Provides: munin-fastcgi | |
| # Required-Start: $remote_fs $syslog $network | |
| # Required-Stop: $remote_fs $syslog $network | |
| # Should-Start: munin | |
| # Should-Stop: munin | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Startup script for Munin CGI services |
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
| ############################################################################### | |
| # The MIT License | |
| # | |
| # Copyright 2012-2014 Jakub Jirutka <[email protected]>. | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is |