# Anchor
click_link 'Save'
# Button
click_button 'awesome'
# Both above
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
#return the initial line | |
grep -n 'pattern' file | |
line_init=57890000 | |
line_end=57890010 | |
sed -n -e "$line_init,$line_end p" -e "$line_end q" filename |
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
# Currently (2017/2018) it's not possible to change the Ruby 'minor' version (eg. 2.3 => 2.4) using the web console | |
# However, it's possible using the 'awscli' tool. | |
brew install awscli # pip install awscli | |
aws elasticbeanstalk update-environment \ | |
--solution-stack-name "64bit Amazon Linux 2017.09 v2.6.1 running Ruby 2.4 (Puma)" \ | |
--environment-name "myappenv1" --region "us-east-2" |
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
CONTAINER_NAME="oracle-xe-11g" | |
SSH_PORT="49160" | |
| |
if [ "$1" = "run" ]; then | |
docker run --name $CONTAINER_NAME -d -p $SSH_PORT:22 -p 1521:1521 -p 49162:8080 alexeiled/docker-oracle-xe-11g | |
elif [ "$1" = "start" ]; then | |
docker start $CONTAINER_NAME | |
elif [ "$1" = "stop" ]; then | |
docker stop $CONTAINER_NAME | |
elif [ "$1" = "restart" ]; 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
public class Test { | |
@org.junit.Test | |
public void testTotals() { | |
assertEquals(0, price("")); | |
assertEquals(50, price("A")); | |
assertEquals(80, price("AB")); | |
assertEquals(115, price("CDBA")); | |
assertEquals(100, price("AA")); |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |
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 express = require('express'); | |
var sys = require('sys'); | |
var oauth = require('oauth'); | |
var app = express.createServer(); | |
var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY"; | |
var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET"; | |
function consumer() { |