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 | |
| /** | |
| * I would rather solve this problem by having a Entity, a dumb business model that contains | |
| * all the data, is dumb (yep), has no logic and represents a data type. | |
| * | |
| * Populate it once and reuse the type where applicable, as it will give many advantages against | |
| * having to juggle around bazillion of separate variables. | |
| * | |
| * a) your business logic and data will be clearly separated - SOC; | |
| * b) KISS DRY; |
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 ctptunnel; | |
| import java.io.IOException; | |
| import java.net.InetSocketAddress; | |
| import java.nio.ByteBuffer; | |
| import java.nio.channels.SelectionKey; | |
| import java.nio.channels.Selector; | |
| import java.nio.channels.ServerSocketChannel; | |
| import java.nio.channels.SocketChannel; | |
| import java.util.HashMap; |
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
| #The MIT License (MIT) | |
| # | |
| #Copyright (c) 2015 Andre Queiroz | |
| # | |
| #Permission is hereby granted, free of charge, to any person obtaining a copy | |
| #of this software and associated documentation files (the "Software"), to deal | |
| #in the Software without restriction, including without limitation the rights | |
| #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| #copies of the Software, and to permit persons to whom the Software is | |
| #furnished to do so, subject to the following conditions: |
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
| 049c1f07bc1d46f791498cfe63f54bc75224375226e9e47eb59eabb444c2c6f9ab76efdc3c20ba7055538dbf1fda702e0e486cba741273c94154374f334d8f0796 |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am addvilz on github. | |
| * I am addvilz (https://keybase.io/addvilz) on keybase. | |
| * I have a public key whose fingerprint is 3B44 AE79 519B 1C65 5294 1B10 9123 B913 EBF5 3D43 | |
| To claim this, I am signing this object: |