gem install mailcatchermailcatcherbrew services restart php54nginx -s reload- Go to http://mail.dev/
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 weightedLinearRegression(data, weights){ | |
| var sums = {xw: 0, x: 0, yw: 0, y: 0, a: 0, b: 0}; | |
| // compute the weighted averages | |
| for(var i = 0; i < data.length; i++){ | |
| sums.xw += data[i][0] * weights[i]; | |
| sums.yw += data[i][1] * weights[i]; | |
| sums.x += data[i][0]; |
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
| echo "alias npm='cmd /c npm'" >> ~/.bashrc |
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
| .sprite-animation(@name, @frame-width, @frame-height, @url, @frame-count, @sprite-width, @duration) { | |
| width: @frame-width; | |
| height: @frame-height; | |
| display: block; | |
| background: url(@url) left center; | |
| animation: @name @duration steps(@frame-count) infinite; | |
| @keyframes @name { | |
| 100% { | |
| background-position: @sprite-width; | |
| } |
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 { | |
| listen 8080; | |
| root /Users/user/Sites/magento.co.nz; | |
| server_name magento.dev "~magento\.(.*)\.xip\.io$"; | |
| fastcgi_buffer_size 128k; | |
| fastcgi_buffers 4 256k; | |
| fastcgi_busy_buffers_size 256k; | |
| proxy_connect_timeout 90; | |
| proxy_send_timeout 180; | |
| proxy_read_timeout 180; |
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
| cd $1 | |
| if ! hash jq 2>/dev/null; then | |
| brew install jq | |
| fi | |
| composer install | |
| jq '.require."silverstripe/cms" = "~3.2.0"' composer.json > tmp.$$.json && mv tmp.$$.json composer.json | |
| jq '.require."silverstripe/framework" = "~3.2.0"' composer.json > tmp.$$.json && mv tmp.$$.json composer.json |
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
| // Usage: | |
| // .ReactCSSTransitionGroupMixin( | |
| // {opacity: 0}, | |
| // {opacity: 1}, | |
| // {transition: opacity 300ms linear} | |
| // ); | |
| .ReactCSSTransitionGroupMixin(@disabled, @active, @transition) { | |
| &-enter { | |
| @disabled(); | |
| &-active { |
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
| fastcgi_buffer_size 128k; | |
| fastcgi_buffers 4 256k; | |
| fastcgi_busy_buffers_size 256k; | |
| proxy_connect_timeout 90; | |
| proxy_send_timeout 180; | |
| proxy_read_timeout 180; | |
| proxy_buffer_size 128k; | |
| proxy_buffers 4 256k; | |
| proxy_busy_buffers_size 256k; | |
| proxy_intercept_errors on; |
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 Foundation; | |
| struct Consumer { | |
| var name: String | |
| var handler: (Any) -> Void | |
| } | |
| class EventEmitter { | |
| static var consumers: [Consumer] = []; |
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
| BlogPost::get() | |
| ->filter(['ParentID' => $this->owner->ParentID]) | |
| ->leftJoin('BlogPost_Categories', 'BlogPost.ID = BlogPost_Categories.BlogPostID') | |
| ->where( | |
| 'BlogCategoryID IN ( | |
| SELECT BlogCategoryID FROM "BlogPost" | |
| LEFT JOIN BlogPost_Categories ON BlogPost.ID = BlogPost_Categories.BlogPostID | |
| WHERE BlogPost.ID = ' . $this->owner->ID . ')') | |
| ->exclude(['ID' => $this->owner->ID]) | |
| ->sort('RAND()') |
OlderNewer