- http://serverfault.com/questions/416787/nginx-403-forbidden-error-hosting-in-user-home-directory
- rails deploy with rvm, capistrano, uniron, nginx
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
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
| package week6 | |
| import scala.io.Source | |
| object collections { | |
| /* read a file of words */ | |
| val in = Source.fromURL("http://lamp.epfl.ch/files/content/sites/lamp/files/teaching/progfun/linuxwords.txt") | |
| /* create a list and filter all words where *all* their characters are not letters (like dashes) */ | |
| val words = in.getLines.toList filter (word => word forall (chr => chr.isLetter)) |
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
| {# | |
| Source: http://dev.dbl-a.com/symfony-2-0/symfony2-and-twig-pagination/ | |
| Updated by: Simon Schick <[email protected]> | |
| Parameters: | |
| * currentFilters (array) : associative array that contains the current route-arguments | |
| * currentPage (int) : the current page you are in | |
| * paginationPath (string) : the route name to use for links | |
| * showAlwaysFirstAndLast (bool) : Always show first and last link (just disabled) | |
| * lastPage (int) : represents the total number of existing pages |
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 | |
| /* | |
| OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
| Author: _ck_ (with contributions by GK, stasilok) | |
| Version: 0.1.7 | |
| Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
| * revision history | |
| 0.1.7 2015-09-01 regex fix for PHP7 phpinfo | |
| 0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter |
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
| package util | |
| object Slug { | |
| def apply(input:String) = slugify(input) | |
| def slugify(input: String): String = { | |
| import java.text.Normalizer | |
| Normalizer.normalize(input, Normalizer.Form.NFD) | |
| .replaceAll("[^\\w\\s-]", "") // Remove all non-word, non-space or non-dash characters | |
| .replace('-', ' ') // Replace dashes with spaces |
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
| /.project |
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
| """ | |
| a simple stop loss/start gain bot | |
| adjust STOP_PRICE/START_PRICE and STOP_VOLUME/START_VOLUME to your needs. | |
| to reset orders during runtime, press (s) for a new stop order and (g) for a new start gain | |
| The file can be reloaded after editing without restarting goxtool by simply pressing the (l) key. | |
| """ | |
| # Using the global statement | |
| # pylint: disable=W0603 | |
| # No exception type(s) specified | |
| # pylint: disable=W0702 |
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
| """ | |
| a simple stop loss bot. | |
| adjust STOP_PRICE and STOP_VOLUME to your needs. | |
| The file can be reloaded after editing without | |
| restarting goxtool by simply pressing the l key. | |
| """ | |
| import strategy | |
| import goxapi | |
| # pylint: disable=C0301 |
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 | |
| /* | |
| */ | |
| class Payment_Adapter_Skrill | |
| { | |
| private $config = array(); | |
| public function __construct($config) | |
| { | |
| $this->config = $config; |