tmux new -s session_name
- vertical:
Ctrl+b % - horizontal:
Ctrl+b " - kill pane:
Ctrl+b x
| <?php | |
| /** | |
| * Book Plain Old PHP class | |
| */ | |
| class Book { | |
| private $title; | |
| private $author; | |
| private $current_page; | |
| <?php | |
| /** | |
| * RendererInterface | |
| */ | |
| interface RendererInterface { | |
| public function render(); | |
| } |
| <?php | |
| class PlainTextRenderer implements RendererInterface { | |
| public function render($data) { | |
| return $data; | |
| } | |
| } |
| <?php | |
| class HTMLRenderer implements RendererInterface { | |
| public function render($data) { | |
| return "<p>{$data}</p>"; | |
| } | |
| } |
| <?php | |
| /** | |
| * Single Responsiblity Principle client code | |
| */ | |
| // create a book instance, book has no knowledge about rendering | |
| $book = new Book(); | |
| $book->setTitle("Some Title"); | |
| $book->setAuthor("Some Author"); |
strace lsstrace -e open lsstrace -e trace=open,read,write lsstrace -o ls.txt lssudo strace -p pidstrace -t lsstrace -c ls| /** | |
| Run it at https://repl.it/repls/PunyDisguisedDalmatian | |
| */ | |
| class Foo { | |
| public void helloFoo() { | |
| System.out.println("Hello Foo"); | |
| } | |
| public Foo getContext() { | |
| return this; |
| class Point: | |
| def __init__(self, x, y): | |
| self.x = x | |
| self.y = y | |
| def __str__(self): | |
| return 'Stringified Point: ({x}, {y})'.format(x=self.x, y=self.y) | |
| def __repr__(self): | |
| return 'Representing Point: ({x}, {y})'.format(x=self.x, y=self.y) |