$ gem install rubocop
- usage $ rubocop #=> bunch of errors (1000's maybe)
| require "async" | |
| CONCURRENCY = 1000 | |
| ITERATIONS = 100 | |
| def work | |
| Async do |task| | |
| CONCURRENCY.times do | |
| task.async do | |
| sleep 1 |
| Vim Development | |
| =============== | |
| Vim source code repository is on hosted on Github: | |
| https://github.com/vim/vim | |
| Apart from Github, development also happens on the vim-dev maillist with people | |
| contributing patches via email. Subscribe if you want to get involved, see | |
| [here](maillist.php#vim-dev). |
| #!/usr/bin/expect | |
| # start ssh process | |
| spawn ssh root@expect | |
| # expect this string on the screen | |
| expect "password" | |
| # type this to the screen | |
| send "foobar123\r" |
| # https://github.com/tmux-plugins/tpm | |
| # install TPM: | |
| # git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |
| set -g @tpm_plugins ' \ | |
| tmux-plugins/tpm \ | |
| tmux-plugins/tmux-sensible \ | |
| tmux-plugins/tmux-pain-control \ | |
| tmux-plugins/tmux-sessionist \ | |
| ' | |
| set -g @almost-sensible 'on' |
| # source tmux.conf | |
| bind R source-file ~/.tmux.conf | |
| # tmux defaults: prefix + arrow | |
| bind h select-pane -L | |
| bind j select-pane -D | |
| bind k select-pane -U | |
| bind l select-pane -R | |
| # tmux defaults: |
| #-------------- | |
| # Basic Example | |
| #-------------- | |
| require "./models" | |
| name_variable = "Bill Smith" | |
| # ActiveRecord | |
| puts Customer.where(name: name_variable) |
| # This is a demo of creating a Postgres FDW (foreign database wrapper) | |
| # that encapsulates a CSV file. | |
| # A CSV file can be manually updated and the PG table data will update too. | |
| # Required steps in PostgreSQL | |
| # | |
| # 1. create a new database | |
| # CREATE DATABASE foobar; | |
| # |
| require "active_record" | |
| require "pg" | |
| # AR connection | |
| ActiveRecord::Base.establish_connection( | |
| adapter: "postgresql", | |
| database: "lynda_test", | |
| username: "<db_username>", | |
| password: "<db_password>", | |
| host: "localhost", |
Article: http://mikegerwitz.com/papers/git-horror-story
faking other user's commits is easy with --author flag
$ git commit --author='Foo Bar <[email protected]>' -m 'some commit'
signing commits ensures:
I really commited all the commits I sign