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
| var outcomes = ['rock', 'scissors', 'paper']; | |
| // Creates random outcome | |
| var randomOutcome = function () { | |
| return outcomes[Math.floor(Math.random() * outcomes.length)]; | |
| }; | |
| // Init prompter (ask user for answer) | |
| var prompter = function () { | |
| var answer = prompt('Select your outcome'); |
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 | |
| running=$(VBoxManage list runningvms | grep -c "PHP virtualbox") | |
| if ((running == 0)) | |
| then | |
| echo 'Starting VirtualBox machine...' | |
| VBoxManage startvm "PHP virtualbox" --type headless | |
| echo '##############################' | |
| echo 'Waiting for the VM to start...' |
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
| javascript:(function () {$('#footer-comment-button').children('span').trigger('click');$('#comment').val('*{{Code review:}}* {color:green}passed{color}');var response = confirm('Code review passed?');if (response) {$('#issue-comment-add-submit').trigger('click')}})(); |
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
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo apt-key fingerprint 0EBFCD88 | |
| sudo add-apt-repository \ | |
| "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ |
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 problem | |
| // @syntax | |
| // ask(URL:String, OPTIONS:Object); | |
| const asked = ask('https://myapi.com/v2/rest/issues', { | |
| interval: 1000, | |
| failFactor: function (interval, errorCount) { | |
| return interval * errorCount; | |
| }, | |
| onError: function () {}, |