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
| if ($request_uri = /) { | |
| set $test A; | |
| } | |
| if ($host ~* teambox.com) { | |
| set $test "${test}B"; | |
| } | |
| if ($http_cookie !~* "auth_token") { | |
| set $test "${test}C"; |
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 function to take a string written in dot notation style, and use it to | |
| * find a nested object property inside of an object. | |
| * | |
| * Useful in a plugin or module that accepts a JSON array of objects, but | |
| * you want to let the user specify where to find various bits of data | |
| * inside of each custom object instead of forcing a standardized | |
| * property list. | |
| * | |
| * @param String nested A dot notation style parameter reference (ie "urls.small") |
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 script is meant to be executed via crontab. | |
| * It should help you easily set li3 commands as cron jobs. | |
| * | |
| * You should put this in the root of your application. | |
| * However, you don't need to, but you would then need to | |
| * pass a --path= option with the path to your app. | |
| * This is because the li3 console command must be called | |
| * from a specific location. |
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
| body { | |
| font-family: Helvetica, arial, sans-serif; | |
| font-size: 14px; | |
| line-height: 1.6; | |
| padding-top: 10px; | |
| padding-bottom: 10px; | |
| background-color: white; | |
| padding: 30px; } | |
| body > *:first-child { |
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 | |
| namespace app\analysis; | |
| use lithium\action\Request; | |
| use lithium\console\Request as ConsoleRequest; | |
| use lithium\core\Environment; | |
| use lithium\data\Connections; | |
| use lithium\util\String; | |
| use MongoDate; |
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
| (function(XHR) { | |
| "use strict"; | |
| var stats = []; | |
| var timeoutId = null; | |
| var open = XHR.prototype.open; | |
| var send = XHR.prototype.send; | |
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
| //Original | |
| func substr(s string,pos,length int) string{ | |
| bytes:=[]byte(s) | |
| l := pos+length | |
| if l > len(bytes) { | |
| l = len(bytes) | |
| } | |
| return string(bytes[pos:l]) | |
| } |
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
| // | |
| // Example usage: phantomjs screenshot.js http://yahoo.com /tmp/yahoo.png | |
| // | |
| var system = require('system'); | |
| var url = system.args[1]; | |
| var filename = system.args[2]; | |
| var page = new WebPage(); | |
| page.open(url, function (status) { |
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
| [alias] | |
| st = status -sb | |
| ci = commit -v | |
| co = checkout | |
| br = branch | |
| d = diff --color-words | |
| dt = difftool | |
| l = log --oneline --decorate | |
| lg = log --graph --oneline --decorate=full | |
| ll = log --no-merges --pretty=format:%C(yellow)%h%Creset\\ %Cgreen%an%Creset\\ %Cred%d%Creset\\ %s |
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 { | |
| server_name img.l; | |
| root /var/www/cache/store/ns365; | |
| index index.html; | |
| # This requests the original file from itself and then resizes the image. | |
| location ~ /resize/(\d+)x(\d+)/(.*) { | |
| proxy_pass http://img.l/$3; | |
| image_filter resize $1 $2; | |
| image_filter_jpeg_quality 90; |