- namespacing (URL)
- WebSockets only have global events
- might actually be global ("shut down server")
- might be context-sensitive ("add an item to the current to-do list")
- WebSockets only have global events
- request & response cycle, with semantics
- WebSockets only have one-off messages
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/socket.io/lib/manager.js Mon Nov 28 10:46:16 2011 -0500 | |
| +++ b/socket.io/lib/manager.js Mon Nov 28 10:49:24 2011 -0500 | |
| @@ -466,12 +466,13 @@ | |
| * @api private | |
| */ | |
| -Manager.prototype.onClientDisconnect = function (id, reason) { | |
| +Manager.prototype.onClientDisconnect = function (id, reason, local) { | |
| for (var name in this.namespaces) { | |
| this.namespaces[name].handleDisconnect(id, reason, typeof this.roomClients[id][name] !== 'undefined'); |
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
| isPalindrome :: Eq a => [a] -> Bool | |
| isPalindrome [] = True | |
| isPalindrome (_:[]) = True | |
| isPalindrome (x:xs) | |
| | x == last xs = isPalindrome $ init xs | |
| | otherwise = False |
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: | |
| - 5.5 | |
| before_script: | |
| - ./travis/before_script.sh | |
| - make composer-install | |
| - make frontend-install | |
| - phpenv config-add tests/php-custom-$TRAVIS_PHP_VERSION.ini | |
| cache: |
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
| bmiTell :: (RealFloat a) => a -> a -> String | |
| bmiTell weight height | |
| | bmi <= skinny = "You're underweight, you emo, you!" | |
| | bmi <= normal = "You're supposedly normal. Pffft, I bet you're ugly!" | |
| | bmi <= fat = "You're fat! Lose some weight, fatty!" | |
| | otherwise = "You're a whale, congratulations!" | |
| where bmi = weight / height ^ 2 | |
| skinny = 18.5 | |
| normal = 25.0 | |
| fat = 30.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
| #!/bin/bash | |
| find . -name '*.php' -type f | while read files | |
| do | |
| sedtest=$(sed -n '/^/,/$/p' "${files}" | sed -n '/<?php/p') | |
| if [ "${sedtest}" ] | |
| then | |
| echo ${files} |
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-cs-fixer fix app/extensions/ --fixers=linefeed,trailing_spaces,unused_use,extra_empty_lines,elseif |
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
| [user] | |
| name = yitznewton | |
| email = [email protected] | |
| [alias] | |
| ci = commit | |
| st = status | |
| co = checkout | |
| br = branch | |
| pur = pull --rebase | |
| subup = submodule update --init |
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
| ROMANS = { | |
| 1 => "I", | |
| 4 => "IV", | |
| 5 => "V", | |
| 10 => "X", | |
| 40 => "XL", | |
| 50 => "L", | |
| 90 => "XC", | |
| 100 => "C", | |
| 400 => "CD", |