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
| import ( | |
| "sync" | |
| "fmt" | |
| ) | |
| func maxGoRoutinesExample(maxNumberOfConnections int) { | |
| var wg sync.WaitGroup | |
| guard := make(chan int, maxNumberOfConnections) | |
| for i := 0; i < 100; i++ { |
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 | |
| $path = $this->pathValidator->getUrlIfValid('<front>'); | |
| $route_name = $path->getRouteName(); | |
| $url = Url::fromRoute($route_name); | |
| $url->setOptions([ | |
| 'attributes' => [ | |
| 'class' => ['name-wrapper'], | |
| ], | |
| ]); |
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 | |
| /** | |
| * Reloads translation file for a given module. | |
| * | |
| * @param mixed $module | |
| * Module(s) name(s). An array of strings or a string. | |
| * @param mixed $languages | |
| * @return array | |
| * An array with a "success" key which is a boolean and a "query" key which |
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
| # -*- mode: nginx; mode:autopair; mode: flyspell-prog; ispell-local-dictionary: "american" -*- | |
| ### WP configuration for using the supercache plugin. | |
| ## Mimicking the .htaccess mod_rewrite rules in Nginx. They all return | |
| ## 405 which means unsupported method. | |
| ## The line below is no longer needed for supercache | |
| ## 0.9.9.9. Uncomment the 3 lines below if using and older version. | |
| # if ($request_uri ~ ^.*//.*$) { |
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
| ## Cache control. Useful for WP super cache. | |
| add_header Cache-Control "store, must-revalidate, post-check=0, pre-check=0"; | |
| ## If no favicon exists return a 204 (no content error). | |
| location = /favicon.ico { | |
| try_files $uri =204; | |
| log_not_found off; | |
| access_log off; | |
| } |
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 | |
| // Load a drushrc.php file from the 'drush' folder at the root of the current | |
| // git repository. | |
| if ($repo_root = _drushrc_find_repo_root()) { | |
| drush_set_context('DRUSH_REPO_ROOT', $repo_root); | |
| if (is_dir($repo_root . '/drush')) { | |
| if (is_file($repo_root . '/drush/drushrc.php')) { | |
| $options['config'] = $repo_root . '/drush/drushrc.php'; | |
| } |