- https://igorzhivilo.com
- @warolv
- @igorzhivilo
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
$(document) | |
.on('ajax:beforeSend', '#scheduling_options_form', function() { | |
console.log('beforeSend'); | |
$('.ajax-loader').show(); | |
}) | |
.on('ajax:success', '#scheduling_options_form', function(data, status, xhr) { | |
console.log('Success'); | |
$('.ajax-loader').hide(); | |
}) | |
.on('ajax:error', '#scheduling_options_form', function(data, status, xhr) { |
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
- if content_for?(:angular_module) | |
= javascript_include_tag 'angular' | |
= javascript_include_tag 'angular-resource' | |
= javascript_include_tag 'angular-ui-bootstrap' | |
= javascript_include_tag 'angular-sanitize' |
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
class StaffController < ApplicationController | |
respond_to :json | |
def index | |
respond_with Staff.all | |
end | |
def show | |
respond_with Staff.find(params[:id]) | |
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
rake db:migrate VERSION=20080906120000 | |
rake db:rollback | |
rake db:migrate:redo STEP=3 | |
rake db:migrate:up VERSION=20080906120000 | |
rake db:migrate:down VERSION=20080906120000 |
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
git reset --soft HEAD^ -> undo last commit and save changes | |
git reset --hard HEAD~1 -> undo last commit and remove changes | |
git reset --hard HEAD~2 -> undo 2 last commits and remove changes | |
git revert commit-hash -> create new commit which reverts last commit | |
git checkout . -> remove all uncommitted changes | |
git checkout filename -> undo changes in specific file | |
git clear -df -> remove all untracked files | |
git rm filename -> remove file from index, after your did git add filename | |
git commit --amend -> change message of last commit |
NewerOlder