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 Personel { | |
| private $name; | |
| private $surname; | |
| private $email; | |
| public function getName() | |
| { |
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 | |
| interface UserProviderInterface { | |
| public function findUserById($id); | |
| } | |
| class UserProvider implements UserProviderInterface { |
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 EmailSender { | |
| private $db; | |
| public function __construct(DatabaseConnection $db) | |
| { | |
| $this->db = $db; | |
| } |
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
| vagrant init ubuntu/trusty64; vagrant up --provider virtualbox |
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
| docker rm `docker ps-a -q` |
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/sh | |
| redis-cli -h remote_host -p remote_port |
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
| from suds.sudsobject import asdict | |
| def recursive_asdict(d): | |
| """Convert Suds object into serializable format.""" | |
| out = {} | |
| for k, v in asdict(d).iteritems(): | |
| if hasattr(v, '__keylist__'): | |
| out[k] = recursive_asdict(v) | |
| elif isinstance(v, list): | |
| out[k] = [] |
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/sh | |
| docker inspect -f '{{ .NetworkSettings.IPAddress }}' <container_name> |
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
| git tag -d 12345 | |
| git push origin :refs/tags/12345 |
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
| str = 'Your byte string' | |
| file = open('xmlToSave.xml', 'wb') | |
| file.write(str.decode('base64')) | |
| file.close() |