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
| function run_function($name, $params) { | |
| // Actually run the function in question | |
| } | |
| while(true) { | |
| // Wait for a connection and extract the function to start | |
| if (function_exists('pcntl_fork')) { | |
| $pid = pcntl_fork(); | |
| if ($pid == -1) { |
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 record_purchase(customer, basket) | |
| basket.each do |product| | |
| product.buyers << customer | |
| end | |
| # Render these into the relation map -- this can be done out of process too | |
| basket.each do |x| | |
| all_products.each do |y| | |
| intersection[x][y] = x.buyers.intersect(y.buyers).count | |
| end |
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
| whereami() | |
| { | |
| export THIS_IS_NOT_MY_BEAUTIFUL_HOUSE=$1 | |
| } | |
| __thereami() | |
| { | |
| local curtask="$THIS_IS_NOT_MY_BEAUTIFUL_HOUSE" | |
| if [ -n "$curtask" ]; then | |
| if [ -n ${1-} ]; then |
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
| I have a nested set of hashes like: | |
| [A] | |
| [B] | |
| [C] | |
| [D] | |
| [E] | |
| [F] | |
| [A'] | |
| [B'] |
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
| I have a nested set of hashes like: | |
| [A] | |
| [B] | |
| [C] | |
| [D] | |
| [E] | |
| [F] | |
| [A'] | |
| [B'] |
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
| class FrameProfiler { | |
| // The root frame is the top-most frame in this trace. It is an error to try and pop it. | |
| private $frameStack; | |
| function FrameProfiler() { | |
| $this->frameStack = array(); | |
| $this->enterSection("root"); | |
| } | |
| function enterSection($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
| SSH_ENV="$HOME/.ssh/environment" | |
| function start_agent { | |
| echo "Initializing new SSH agent..." | |
| /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" | |
| echo succeeded | |
| chmod 600 "${SSH_ENV}" | |
| . "${SSH_ENV}" > /dev/null | |
| /usr/bin/ssh-add; | |
| } |
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
| backend | |
| ======= | |
| while true do | |
| select(listener, 1s) | |
| if commands | |
| send them | |
| end | |
| if get_button | |
| send beep down button pipe |
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
| if (i == 5) | |
| handleIEqualToFive(); | |
| doSomethingElseCompletelyUnrelated(); | |
| doYetAnotherUnrelatedThing(); | |
| ... | |
| ... |
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
| [{"name":"playback","filename":"1"}, | |
| {"name":"playback","filename":"3"}] |