set mvim as editor for git
git config --global core.editor "mvim --remote-wait"
revert interactive rebase
git reset --hard ORIG_HEAD
set mvim as editor for git
git config --global core.editor "mvim --remote-wait"
revert interactive rebase
git reset --hard ORIG_HEAD
| --- Actions --- | |
| $Copy <M-C> | |
| $Cut <M-X> <S-Del> | |
| $Delete <Del> <BS> <M-BS> | |
| $LRU | |
| $Paste <M-V> | |
| $Redo <M-S-Z> <A-S-BS> | |
| $SearchWeb <A-S-G> | |
| $SelectAll <M-A> | |
| $Undo <M-Z> |
Git provides a simple way to find out where some code was modified or removed from your codebase. You can use git bisect for that and the processes can be completely automated.
As example I will try to find out when the method send_email_notification was removed from the file app/models/person.rb.
So you have to create a automated bash file, or other kind of script, that should return 0 when the method is found and 1 otherwise. So git can run this script for each commit until it returns 1, which means that the method was removed in that commit. There's the script we gonna use:
if [[ `cat app/models/person.rb | grep send_email_notification` ]]; then
| def self.uniq! queue_name | |
| seen_already = Set.new | |
| Sidekiq::Queue.new(queue_name).each { |job| | |
| key = { job.klass => job.args } | |
| key.in?(seen_already) ? job.delete : seen_already << key | |
| } | |
| end |
| # Assuming an Ubuntu Docker image | |
| $ docker run -it <image> /bin/bash |
| git fetch --all | |
| git reset --hard origin/master | |
| git pull origin master |
| http://speakmy.name/2013/04/02/concurrent-programming-and-threads-in-ruby-reading-list/ | |
| Concurrent Programming and Threads in Ruby - a reading list | |
| 02 April 2013 | |
| Many rubyists consider threads in Ruby as somewhat of an arcane knowledge, though in reality they’re a very well researched and understood concept. Of course, writing effective multithreaded concurrent programs requires certain amount of knowledge and discipline from the programmer, but there’s nothing that a smart one can’t learn if he wants to. | |
| To help with the task, awesome @brainopia compiled a list of recommended reading on the topic of concurrency and threads. All kudos go to @brainopia, and the original list in Russian as available as a gist here: |
| ActiveAdmin.register Project do | |
| # Don't forget to add the image attribute (here thumbnails) to permitted_params | |
| controller do | |
| def permitted_params | |
| params.permit project: [:title, :summary, :description, :thumbnail, :date, :url, :client_list, :technology_list, :type_list] | |
| end | |
| end | |
| form do |f| |