0
- beginning of line^
- beginning of non-whitespace$
- end of line9j
- move down 9 linesw
- move forward by wordb
- move backward by word
This file contains 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 = find(".box-header", text: "E-Billing Information").first(:xpath, ".//..") | |
within(container) do | |
end |
This file contains 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
# Backup database | |
docker exec -i APPNAME_db_1 pg_dump -U postgres -C APPNAME_production > /tmp/APPNAME_production.back | |
# Restore | |
docker exec -i APPNAME_db_1 psql -U postgres < APPNAME_production.back | |
# Rename database | |
docker exec -i APPNAME_db_1 psql -U postgres | |
ALTER DATABASE name RENAME TO new_name |
This file contains 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
rails new . --api --webpack=vue --database=postgresql | |
gem 'closure_tree', '~> 6.5' | |
gem 'ransack', github: 'activerecord-hackery/ransack' | |
gem 'pundit', '~> 1.1' | |
gem 'rails-i18n', '~> 5.0', '>= 5.0.4' | |
gem 'rails_12factor', group: :production | |
gem 'exception_notification', git: 'https://github.com/smartinez87/exception_notification' |
This file contains 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
// Dispatch | |
var event = { | |
bubbles: false, | |
composed: true, | |
detail: { | |
criteria: selectedCriterion | |
} | |
} | |
this.dispatchEvent(new CustomEvent('event', event)); |
This file contains 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
`emacs --daemon` to run in the background. | |
`emacsclient.emacs24 <filename/dirname>` to open in terminal | |
NOTE: "M-m and SPC can be used interchangeably". | |
* Undo - `C-/` | |
* Redo - `C-?` | |
* Change case: 1. Camel Case : `M-c` | |
2. Upper Case : `M-u` | |
3. Lower Case : `M-l` |
This file contains 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
yaourt -S ttf-roboto-mono-powerline-git |
This file contains 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
# Remove unused images | |
docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}") | |
# Remove dangling images | |
docker rmi $(docker images --filter "dangling=true" -q --no-trunc) | |
# Ejecutar bash dentro de un servicio docker | |
$ docker-compose exec <service id> bash |
This file contains 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
Merge audio and video | |
1) Remove 1 secons of the video to have the same time of the audio, | |
the total of the video is 01:40:42 | |
ffmpeg -ss 00:00:00 -t 01:40:41 -i video.mp4 -vcodec copy -acodec copy output.mp4 | |
2) Remove the audio from the video |
This file contains 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
FROM ruby:2.2.3 | |
RUN apt-get update -qq | |
RUN apt-get install -y -qq build-essential | |
RUN apt-get install -y -qq nodejs | |
RUN apt-get install -y -qq libpq-dev | |
ENV APP_HOME /app | |
ENV BUNDLE_PATH /bundle | |
ENV BUNDLE_JOBS 5 |
NewerOlder