save_and_open_page
have_button(locator)
#!/usr/bin/env ruby | |
# A sneaky wrapper around Rubocop that allows you to run it only against | |
# the recent changes, as opposed to the whole project. It lets you | |
# enforce the style guide for new/modified code only, as opposed to | |
# having to restyle everything or adding cops incrementally. It relies | |
# on git to figure out which files to check. | |
# | |
# Here are some options you can pass in addition to the ones in rubocop: | |
# |
FROM ruby:2.3.0-alpine | |
ENV PROTOBUF_VERSION 3.0.2 | |
RUN apk add --update build-base autoconf automake libtool git perl && \ | |
curl --location --silent --output /tmp/protobuf.tar.gz https://github.com/google/protobuf/archive/v$PROTOBUF_VERSION.tar.gz && \ | |
tar xfz /tmp/protobuf.tar.gz -C /tmp/ && \ | |
cd /tmp/protobuf-$PROTOBUF_VERSION && \ | |
./autogen.sh && \ | |
./configure --prefix=/usr && \ |
function wait_run_in_parallel() | |
{ | |
local number_to_run_concurrently=$1 | |
if [ `jobs -np | wc -l` -gt $number_to_run_concurrently ]; then | |
wait `jobs -np | head -1` | |
fi | |
} | |
function get_status() { | |
local line=$1 |
indexer | |
{ | |
} | |
searchd | |
{ | |
listen = 127.0.0.1:9306:mysql41 | |
log = /home/vyper/Documents/Projects/sphinx-test/log/development.searchd.log | |
query_log = /home/vyper/Documents/Projects/sphinx-test/log/development.searchd.query.log | |
pid_file = /home/vyper/Documents/Projects/sphinx-test/log/development.sphinx.pid |
development: | |
adapter: mysql2 | |
username: root | |
password: | |
database: sphinx_test_development | |
test: | |
adapter: mysql2 | |
username: root | |
password: |
# sandbox | |
SANDBOX_DIR=~/Documents/Projects/ | |
_sandbox() { | |
local current=${COMP_WORDS[COMP_CWORD]} | |
local options="reset `ls $SANDBOX_DIR`" | |
COMPREPLY=( $(compgen -W "$options" $current) ) | |
} | |
cd_sandbox() { | |
cd $SANDBOX_DIR/$1 | |
} |
echo "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | grep -v libc-dev| xargs sudo aptitude -y purge |
String.prototype.slugify = function() { | |
return this.toLowerCase().trim() | |
.replace(/[áàãâä]/g, "a") | |
.replace(/[éèẽêë]/g, "e") | |
.replace(/[íìĩîï]/g, "i") | |
.replace(/[óòõôö]/g, "o") | |
.replace(/[úùũûü]/g, "u") | |
.replace(/ç/g, "c") | |
.replace(/(\ |_)+/, " ") | |
.replace(/(^-+|-+$)/, "") |