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 | |
| brew search librabbitmq | |
| brew install rabbitmq-c | |
| pecl install amqp | |
| # set the path to librabbitmq install prefix [autodetect] : /usr/local/Cellar/rabbitmq-c/0.10.0 | |
| # if it fails follow the following (reference: https://github.com/pdezwart/php-amqp/issues/355#issuecomment-563203121): |
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 | |
| $str = "String to loop through" | |
| $strlen = strlen( $str ); | |
| for( $i = 0; $i <= $strlen; $i++ ) { | |
| $char = substr( $str, $i, 1 ); | |
| // $char contains the current character, so do your processing here | |
| } | |
| ?> |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
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 | |
| /* | |
| * Plugin: StreamlineFoundation | |
| * | |
| * Class: Schedule | |
| * | |
| * Description: Provides scheduling mechanics including creating a schedule, testing if a specific moment is part of the schedule, moving back | |
| * and forth between scheduled moments in time and translating the created schedule back to a human readable form. | |
| * | |
| * Usage: ::fromCronString() creates a new Schedule class and requires a string in the cron ('* * * * *', $language) format. |
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
| Install PHP 5.6 On linux (Debian, Ubuntu, Mint ...) | |
| sudo apt-get install python-software-properties | |
| sudo add-apt-repository ppa:ondrej/php | |
| sudo apt-get update | |
| sudo apt-get install -y php5.6 | |
| heck Installed PHP Version | |
| php -v |
Getting started:
Related tutorials:
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title>User Search</title> | |
| <meta name="viewport" content="width=device-width"> | |
| <style> | |
| body { margin: 2em; text-align: center; } | |
| form { margin-bottom: 2em; } |
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
| def delete_first(self): | |
| deleted = self.head | |
| if self.head: | |
| self.head = self.head.next | |
| deleted.next = None | |
| return deleted |
NewerOlder